[PHP] another 4.3.0 issue?

2003-01-09 Thread john
ive recently started experiencing a problem from broadcasts made over a
mailing list i wrote some time ago.  up until now its been functioning fine,
however recently it started sending out raw html unformatted (tags etc
appearing in email), instead of the usual interpreted results.  this
coincided, as best i can tell, with my isp upgrading their server to php
4.3.0.  the only change is in the subject line as follows;

this is the subject line from a working email;
-Subject: update 10:32pm Dec 6
this is the subject line im getting now since the change (incorrect!);
-Subject: update 9:54am Jan 9 MIME-Version: 1.0 Content-Type: text/html;
charset="iso-8859-1" Content-Transfer-Encoding: base64  From: [  ] <
 > Reply-To: 

as you can see its now putting EVERYTHING within the header on that one line
and ignoring the \n after each row (see relevant section of my code below)
..

   $br_subjectc = "$br_subjectbox\n";
   $br_subjectc .= "MIME-Version: 1.0\n";
   $br_subjectc .= "Content-Type: text/html;\n\tcharset=\"iso-8859-1\"\n";
   $br_subjectc .= "Content-Transfer-Encoding: base64\n\n";
   $br_subjectc .= "From: [$title] < $br_return >\n";
   $br_subjectc .= "Reply-To: $br_return\n";

any idea what is causing that? ive looked on php.net and i cant see anything
that catches my eye mentioned about this in the changelog. im not aware of
any alteration to email structure standards either.

tia
john


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] CHECKING A PAGE EXISTS

2003-07-01 Thread John
How do I, in PHP, check if a submitted URL exists and doesnt return a 404
error. can i open it with fopen and somehow get the HTTP response or does it
require something else


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] OT (kinda): Mod_rewrite

2003-07-01 Thread John
When using mod_rewrite, is there any way to post variables from a form the
way you want to.

eg 
a text box called first name
another textbox called second name
action being http://www.searcher.com/search

and the result being
http://www.searcher/search/firstname/secondname

is this possible?? i dont think so
and sorry 4 d capitals last time round!!!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] mod_rewrite is acting up!!

2003-07-02 Thread John
ok, i had mod_rewrite working perfect: whenever some one entered
www.url.com/browse/Pop/10 it would go to
www.url.com/browse.php?category=Pop&id=10

Then I created an actual browse folder in the site root with index.php as
the only file in that folder to take over the position of the browse.php
file. and now it doesnt work at all. Now, whenever someone visits
www.url.com/browse/Pop/15, I want it to go to
www.url.com/browse/index.php?category=Pop&id=10 but it doesnt work. Instead,
it sends it to somewhere like this:
http://www.url.com/browse/index.php?category=index.php

What the hell is going on??


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ANNOUNCING: Rekall V2.0.0 for Linux/UNIX, Windows, and the Sharpe family of Linux PDAs

2003-07-07 Thread john
Hi

Do you want to create, edit, or update your PHP databases remotely within a
nice Graphic User Interface without having to use your Web Browser, well you
can do that with Rekall and last week Rekall V2.0.0 was finally released for
KDE3. QT3-only, Windows and Sharp Zaurus. We even have a run time only
version so that you can distribute your Rekall applications. Yes, that's
true, you create applications in much the same way can with MS Access, since
Rekall is a programmable database client. For more information, tutorials,
HOWTOs, examples, etc. please visit http://www.rygannon.com

We are pleased to announce the 2.0 release of Rekall, a personal,
programmable DBMS system for Linux and Windows.  Rekall is the only viable
alternative to MS Access for Linux. With Rekall you will be able to quickly
and easily build database applications using Rekall forms and reports. A
full complement of widgets means that applications built in Rekall will be
able to have the look and feel of any other application. Rekall applications
can be extended in their functionality to perform virtually any task via
embedded Python as a scripting language.

Ever since the release of dBase many years ago, the idea of a programmable
DBMS has become increasingly popular. Major systems have been written in
applications like Paradox and MS Access. By focusing on the database, users
are able to leverage their business knowledge into working applications. One
of the limitations of the aforementioned products is that their native
database didn't scale well or support multiple users very well. Rekall
avoids this problem by dispensing with a native database.

The biggest addition to Rekall 2.0.0 is reusable components. Rekall now
comes with a selection of components that you can use in forms; these
include standard buttons and navigation tools.

In addition to these components, you can also construct your own for use as
often as you want. You can store your components either in the database
itself, or in a local area in the file system.

To support reusable components, and to make it easier to script complicated
forms, Rekall 2.0.0 introduces an Event/Slot mechanism (akin to Qt's
Signal/Slot mechanism). This allows to place all script code which is

logically associated with a particular control inside that control, and
means you can copy or delete the control without worrying about copying or
cleaning up script code inside other controls.

Other new features in Rekall 2.0.0 include:

* Static images can by displayed in forms
* Data controls can appear in menu-blocks
* Spin box control
* Link controls can display multiple colums
* Link controls can use Queries as well as tables
* Event logger for debugging
* Raw SQL window for direct SQL execution
* Forms, Reports, etc. can run modally
* Fast table filters for predefined table data display
* Modal forms can be used as dialog boxes
* Explanation of queries generated by Rekall
* Menu and toolbar hiding
* MySQL and PostgreSQL connections over SSH tunnels (Linux only)

In addition, Rekall comes with a thorough demonstration database that
illustrates the various features of the applications.  There are actually
three copies of the database, one using MySQL, one PostgreSQL and one using
XBase/XBSQL. Optional drivers are currently available for DB2 and ODBC with
Oracle9i  coming later this summer (the Windows version is ready now).

By purchasing Rekall you are getting the source for the application and free
electronic updates to the core application. You get all supported platforms
for one price regardless of when they are released. Rekall is priced at
$79.95 for the physical package and $69.95 for the electronic package.

Rekall can be purchased from www.thekompany.com/products/rekall. Rekall
V2.0.0 demo version can be downloaded from http://www.rygannon.com by
selecting downloads from the navigation menu or by clicking on the downloads
button on the top navigration bar
.


Regards
John



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] REGULAR EXPRESSION HELP

2003-07-11 Thread John
Hi,

I'm pretty new to regular expressions. Before, I used to write long-winded
and buggy segments of code with PHPs string functions to extract text. But I
want to learn how to use perl reg-ex as it seems useful to know so I ordered
"Mastering Regular Expressions". But it hasn't come yet so I'm asking for
help...

I need to match a pattern, not in a single-line but from a HTML page, which
obviously has loads of lines. I need to match 2 lines from this HTML page:
1) FirstVariable - Second Variable
2) (newline)
ThirdVariable...

I tried this code:
1) preg_match("/(\S+) - (\S+)/", $html_page,
$variables);
2) preg_match("/\n(\S+)/", $html_page,
$variables);

The first 2 variables are matched into the $variables array but not the
third one. Sometimes when the third one is matched, it starts from where I
want it to start but takes all the text to the end of the HTML document!

Any ideas? Is there any characters that I should have escaped that I
didn't?? All I can think of is that because the first line that I want to
match is on the FIRST LINE of the html page, that matches. But reg-ex can't
handle the next line as its way down the page

TIA



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Parsing MySQL query return

2003-07-28 Thread John
Hey All,

I have a question regarding parsing text from a MySQL query. Basically, I
have several paragraphs of text in a field in MySQL. I run a query, get the
results, no problem. However, I would like to only display the first
paragraph of the data returned.

What is the best way to do this?

Thanks,
John




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Parsing MySQL query return

2003-07-28 Thread John
I'm using someone elses data here (inheriting). But it looks like it was
typed into the field, possibly using PHPMyADMIN. I would assume the
paragraphs are just seperated by carriage returns. Is there a way to tell
for sure?

John


"Ewout De Boer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> - Original Message - 
> From: "John" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, July 28, 2003 8:22 PM
> Subject: [PHP] Parsing MySQL query return
>
>
> > Hey All,
> >
> > I have a question regarding parsing text from a MySQL query. Basically,
I
> > have several paragraphs of text in a field in MySQL. I run a query, get
> the
> > results, no problem. However, I would like to only display the first
> > paragraph of the data returned.
> >
> > What is the best way to do this?
>
> That depends on te format of the text/paragraphs in the mysql field.
> How are the paragraphs separated ?
>
>
>
> regards,
> Ewout
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problem occurs when included file includes anther file.

2003-08-14 Thread John
I came across this problem recently -also a similar prob with basedir
restrictions !
I even wrote to the php guys about the documentation and got told if was
documented but hard to find and it wasn't there
fault that the search on php.net doesn't work very well !
Which I have to admit didn't leave me totally satisfied ! :-))

Although on the plus side - after that initial brush off, the report got
reopened !
Although my initial problem had been solved in the lastest build !



> nc01.php from demo.php: ok in root/./inc01.php
> Indeed, the PHP doc should be updated on that point.
> I do agree with you, after struggling a while for the
> same kind of problem :-)
>
> But I've got all explanations below.
>
> Nicholas Robinson wrote:
> >>The directory structure is as follows:
> >>|-- demo.php
> >>|-- inc/
> >>|-- inc1.php
> >>|-- inc2.php
> >>
> >>=== file demo.php ==
> >>require 'inc/inc1.php';
> >>
> >>=== file inc/inc1.php ==
> >>require 'inc2.php';
> >>
> >>== file inc/inc2.php ==
> >>this is a test
> >>
> >>The above inc/inc1.php is ok for testing.And this would be ok too:
> >> >>//file inc/inc1.php
> >>require 'inc/inc2.php';
> >>?>
> >>
> >>Problem occurs when the code is like this
> >> >>//file inc/inc1.php
> >>require './inc2.php';
> >>?>
> >>Fatal error: main(): Failed opening required './inc2.php'
> >>(include_path='.:/usr/local/lib/php')
>
> Your code is not correct, in PHP before 4.1 at least.
> The include path is always the one of the (initial) script.
> It's "/" in your case. You must use "require inc/inc2.php"
> even in inc1.php because the search path in inc1.php
> (used by require inc/inc2.php) is '/' (initial script) and not
> '/inc'.
>
> NB this behaviour changed after 4.1. Now, the search path is
> first the (initial) script, and _if_not_found_there, the path
> of the including (parent, included) script.
>
> So your code will somewhat works after PHP 4.1 (unless an included
> file has the same name in the including script), but it can't
> work before PHP4.1. The best option seems to always use the old
> convention, to avoid confusion (and clash in file names, which
> could be a difficult to find bug).
>
> >>It seems that there's noxplanation about this in php manual.Could
> >>someone give some?
>
> Yes, but I think it's really well hidden (in doc users comments)
>
> Look at the comment of "ivo at i7 dot nl" on "26-Nov-2002 08:56" in
> http://www.php.net/manual/en/function.include.php
>
> >>Btw,I am using redhat 7.2 / Apache 2.0.47 / PHP 4.3.3RC1
>
> I guess your code works on that particular server and
> not on another one ?
>
> I had the same surprise that you have, so I do always this now.
>
> 1. Use old convention (require './include/inc01.php')
> even in included files
> 2. Use '.' in front of path as show above, just in case (bad php.ini)
>
> In fact there is a more subtle pblm left. The old semantic means
> the 'require' in an included file depend on the 'require' of the
> including file! Here under an example to better understand.
> It happens when you have a subdir (say admin) which contain php
> libraries used in that subdir and in the parent dir (can be often)
> I suppose an 'old' PHP (before 4.1) as some of the ones I use.
>
> Path:
> root/demo.php
> root/inc/inc01.php
> root/admin/demoadm.php
> root/admin/inc/lib01.php
> root/admin/inc/lib02.php
>
> Includes:
> lib01.php incl lib02.php : require './inc/lib02.php'
> demoadm.php incl lib01.php: require './inc/lib01.php'
> demo.php incl inc01.php: require './inc/inc01.php'
>
> Ok until now for demo.php and demoadm.php, but add this include:
> inc01.php incl lib01.php: require './admin/inc/lib01.php'
>
> Code is broken in demo.php but not for demoadm.php
>
> When calling demoadm.php, search path is root/admin,
> includes:
> ./inc/lib01.php from demoadm.php: ok in root/admin/./inc/lib01.php
> ./inc/lib02.php from lib01.php: ok in root/admin/./inc/lib02.php
>
> when calling demo.php, search path is root/
> includes:
> ./inc01.php from demo.php: ok in root/./inc01.php
> ./admin/inc/lib01.php from inc01.php: ok in root/./admin/inc/lib01.php
> ./inc/lib02.php from lib01.php: KO in root/./inc/lib02.php
>
> Pblm is in lib01.php:
> - called from demoadm, we need './inc/lib02.php'
> - called from demo, we need './admin/inc/lib02.php'
>
> I guess that's the reason of the change in include/require semantics.
> But it can be resolved simply. Here's my solution
>
> 1. create root/admin/inc/admconfig.php (all cfg vars for root/admin/)
> 2. in admconfig.php, set admindir var: " $admindir= './' "
> 3. create root/inc/config.php (all cfg vars for root/)
> 4. in config.php, set admindir var: " $admindir= './admin/' "
> 5. in 'lib01-type' files, use
> require $admindir . './inc/lib02.php'
> 6. of course, include admconfig.php in all root/admin/ php files
> and config.php in all root/ php files
>
> Another solutions left as exercice, as well as asking PHP guys
> to update the doc for includes ;-)
>
> --
> Christophe Chisogne
> Developper, 

[PHP] re: shell_exec

2003-08-17 Thread John
All I want to do is execute a perl script. I do not care about output to
browser. I have used shell_exec, system, exec, and backticks with no
avail.

Here is what i have now in my php page.
shell_exec("perl data/addSite.pl" . " &> /tmp/error " );

I know the perl script executes because a basic print statement in the
perl script is outputted to /tmp/error. However anything else in the
script not having to do with output is not executed. The perl script is
basically supposed to add a file. That is it. The perl script is fine
from command line. All paths are correct and like I said I do not care
about output to the browser for the user. My questions is why does the
perl script execute (and mostly work) but not execute certain pieces of
code when executed from my php page.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Mail Header - id this PHP

2003-03-26 Thread John
Hello,

I am trying to format the mail header that will be send by mail().

One thing that I noticed was it only accept for the first no. of lines or
charracters (???) See sample 1 & 2.

Is this a php problem (4.2.2) or has something to do the mailer ???

This script is working on (4.2.1) but is in different type of server.

FYI, on header sent it has some other default header included




Example. (1)

 $mail_headers .= "MIME-Version: 1.0\r\n";
 $mail_headers .= "From: WEB\n";
 $mail_headers .= "Reply-to: $Email\n";
 $mail_headers .= "Bcc: [EMAIL PROTECTED]";
 $mail_headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
 $mail_headers .= "Content-Transfer-Encoding: quoted-printable\r\n";

To: [EMAIL PROTECTED]
Subject: Test
From: [EMAIL PROTECTED], [EMAIL PROTECTED]
Reply-to: [EMAIL PROTECTED]
MIME-Version: 1.0

Rejected
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable


Example (2)


 $mail_headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
 $mail_headers .= "Content-Transfer-Encoding: quoted-printable\r\n";
 $mail_headers .= "MIME-Version: 1.0\r\n";
 $mail_headers .= "From: WEB\n";
 $mail_headers .= "Reply-to: $Email\n";
 $mail_headers .= "Bcc: [EMAIL PROTECTED]";

To: [EMAIL PROTECTED]
Subject: Test
Content-Type: text/html; charset=ISO-8859-1

Rejected:
Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0
From: [EMAIL PROTECTED], [EMAIL PROTECTED]
Reply-to: [EMAIL PROTECTED]




Regards,

John



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP Chat/Online Help

2003-04-01 Thread John
i'm looking for some info with regards to php chat or php online help...

1. how to enable the transaction
2. server load
3. is it possible to immitate the msn?
4. others.

the concept is a simple client window that connect or talks to the other
side/moderator....

john



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] $_SERVER[REMOTE_ADDR]

2003-04-01 Thread John
Makes me think.. what exactly the $_SERVER[REMOTE_ADDR] is doing

Cause it does not really show the actual IP address instead IP address
within its range

e.g. 66.87.25.122
output 66.87.25.2

any idea how to get their actual IP add and if possible the name of their
computer

Also, is it also possible to get or trace the IP add?

many thanks,
John



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] server error sending email from script

2002-10-06 Thread John

Q:
If I'm not on the server that is to be used to send the email, how can I configure PHP 
to send from a certain server?
thanks all
 
Warning: Server Error in c:\program files\apache 
group\apache\htdocs\sonicmailer\sonicadmin.php on line 276

and line 276 is
mail($address, stripslashes($subject), $finalbody, $mailheaders);

and it's not sending the email.
The variables are OK, 
$mailheaders=From: blah Reply-To: [EMAIL PROTECTED]





Re: [PHP] Mailing all the elements of a form

2002-07-07 Thread john



Hi Jeremy

You might try the following:

1. set your form elements up so each input can be accessible as part of an 
associative array e.g.






2.  create a trusted fields array in your mailing script:

$trusted_fields = array("forename", "surname");

order this array in the order you wish the form items to be mailed, e.g. forename, 
surname, address etc.

3.  loop through each item in the trusted fields array and get the value of the 
corresponding field out of the input_array, build the body of your email and send as 
required - as you go through each field you can do form validation, and format the 
output as required, for example:

foreach ($trusted_fields as $trusted_field) {
  if (!empty($input_array[$trusted_field]))
$body .= $trusted_fields[$trusted_field] . ":" . $input_array
[$trusted_field] . "\n";
}

This in theory will build the body as field: field_value\n.. for each field in the 
the trusted_fields array that is not empty.

code untested - but concept should work.

Rgds

John


 Original Message 
From:   Jeremy Bowen
Date:   Sun 7/7/02 6:31
To: [EMAIL PROTECTED]
Subject:[PHP] Mailing all the elements of a form

Hey,

I have looked in PHP manual but I cannot seem to find what I am looking for.

I have a very large form that I need to be able to mail. I just don't want
to have to code all of the field into my mail() function.

Thanks,

Jeremy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] newbie: a couple basic questions

2002-07-07 Thread john



Hi

Yes the return function exits the function - you can specify a return value to 
http://www.php.net/manual/en/function.return.php

HTTP_POST_VARS is depricated (still works though) $_POST has replaced:

http://www.php.net/manual/en/reserved.variables.php#reserved.variables.post

Basically $_POST is an associative array of form values submitted using the POST 
method - you should look at  
http://www.php.net/manual/en/reserved.variables.php#reserved.variables.get to.


Regards

John

 Original Message 
From:   Alexander Ross
Date:   Sun 7/7/02 21:33
To: [EMAIL PROTECTED]
Subject:[PHP] newbie: a couple  basic questions

1) in a fuction, does a return statment automatically exit the function as
well?
2) can someone give me a better explination of $HTTP_POST_VARS



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] rand() function not working right

2003-08-31 Thread john
youre not the only one .. i just installed 4.3.3 and $x = rand(1,173);
always returns 101 for $x

i changed to mt_rand(1,173); and that always returns 142  ???

weirdness .. dont tell me this is happening to only me?



- Original Message - 
From: <[EMAIL PROTECTED]>
To: "php general list" <[EMAIL PROTECTED]>
Sent: Thursday, May 29, 2003 4:29 AM
Subject: [PHP] rand() function not working right


> I'm using the latest php and the rand() function isn't working properly
when
> giving it any min and max arguments.
> It does work without anything between the () but if I put a min and max,
> then only the min value always gets chosen.
>
> Is that a bug? Is that new?
>
> I'm not using an old php version, and it makes no difference to seed or
not.
> I've switched to mt_rand() and it seems to work fine with min/max so far..
>
> -- 
> Didier Godefroy
> mailto:[EMAIL PROTECTED]
>
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] rand() function not working right

2003-08-31 Thread john
hope not ... winxp


- Original Message - 
From: "Curt Zirzow" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 31, 2003 5:13 PM
Subject: Re: [PHP] rand() function not working right


> * Thus wrote john ([EMAIL PROTECTED]):
> > youre not the only one .. i just installed 4.3.3 and $x = rand(1,173);
> > always returns 101 for $x
> > 
> > i changed to mt_rand(1,173); and that always returns 142  ???
> > 
> > weirdness .. dont tell me this is happening to only me?
> 
> it works find with 4.3.3RC1 on unix.  I'm curious if this is an OS
> issue, what OS are you running php on?
> 
> 
> 
> Curt
> -- 
> "I used to think I was indecisive, but now I'm not so sure."
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Add a leading zero

2003-09-24 Thread John
Take your result and use sprintf.

$variable_fixed=sprintf("%06s",$variable);

The above code with make $variable 6 digits long and fill all "empty" spaces
with zeros. So if $variable=42, the $variable_fixed with be 42.

Specifically, for your code below, I would say put an if statement after the
while, but before the echo.

if ($i==0){
$i = sprintf("%02s",$i);
}
?>
">"
 wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> How can i add a leading zero to the first result of this loop so that i
get
> 00, 15, 30, 45?
>
> 
> $i = 0;
>   while ($i <= 45){
>echo ''.$i.'';
>$i+=15;
>   }
>  ?>
>
> Thanks for your help

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: date problem

2003-09-24 Thread John
For me, on Windows, it won't work because Windows won't do anything prior to
1970.

On linux, I get 17 as the result. If I change the year to 2000, then I get
08 on both.

John


"Shaun" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> Why does the following code print '00', surely it should print '08', I'm
> baffled!
>
> date("H", mktime(8, 0, 0, 0, 0, 0));
>
> Thanks for your help

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] array_multisort ... unsupported in different builds?

2003-09-28 Thread john
ok, heres the thing

short version;
array_multisort works on localhost but when i upload it, ceases to work (array is left 
unsorted)

long version;
i have array_multisort sorting a multi dimensional array with sort_asc. i understand 
that it sorts by the first index by default. on my localhost (iis on xp, php4.3.3) it 
works perfectly sorting the whole array based on the first row, but when i upload the 
code to the online webserver the array_multisort does nothing. no sorting is taking 
place, its as though the line is being skipped, but its not in the middle of an if 
statement or any other possible means of being skipped logically. ive tried uploading 
this on a both a 4.3.3 server and a 4.3.2 with the same result.

i started off with just listing the parts of the array, eg array(something, something 
else, blah) so it assigns index numbers. then as part of updating various things i 
changed that to set the indexes myself, eg array(indexname => something, index2 
=>somethingelse) etc. it was working online before so ive tried putting just the first 
row as non-assigned index, and going back to number indexes for the whole lot, and no 
dice.

can anyone suggest why this would work fine on my machine and yet cease to function on 
another server of the same version? im completely at a loss and p***ed off.

tia
john

Re: [PHP] array_multisort ... unsupported in different builds?

2003-09-28 Thread john
umm.. yeah. i wrote out this example below to paraphrase my code and it
worked perfectly both localhost and online. so then i got really p***ed =)

i did some more looking and i realised its actually caused by a session
interference... panic over =) ive been wondering wtf was the deal was with
this for days! it seems the servers online handle sessions differently from
my localhost, i only thought to look for session related issues because its
been causing odd results elsewhere too. i guess that will teach me to be lax
with sessions. unsetting the session before redefining them them cured the
other one, and cured this too. thanks for prompting me to find it,
indirectly =)


$i = array(3, 2, 5, 1, 4);
$hate = array(stuff3, stuff2, stuff5, stuff1, stuff4);
$dodgy = array(blah3, blah2, blah5, blah1, blah4);
$problems = array(meh3, meh2, meh5, meh1, meh4);

for ( $tick = 1; $tick < 4; $tick++ ) {

 $i_each = $i[$tick];
 $hate_each = $hate[$tick];
 $dodgy_each = $dodgy[$tick];
 $problems_each = $problems[$tick];

 $slack[] = array(i => $i_each, hate => $hate_each, dodgy => $dodgy_each,
problems => $problems_each);

}

array_multisort($slack, SORT_ASC);

echo $slack[0][i]."";
echo $slack[0][hate]."";
echo $slack[0][dodgy]."";
echo $slack[0][problems]."";

result;
1
stuff1
blah1
meh1





- Original Message - 
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, 29 September, 2003 2:17 AM
Subject: Re: [PHP] array_multisort ... unsupported in different builds?


> On Monday 29 September 2003 00:12, john wrote:
>
> > short version;
> > array_multisort works on localhost but when i upload it, ceases to work
> > (array is left unsorted)
>
> [snip]
>
> Could you post a concise example which illustrates your problem?
>
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> You can fool all the people all of the time if the advertising is right
> and the budget is big enough.
> -- Joseph E. Levine
> */
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Parsing a tab delimited log file

2003-10-29 Thread John
(I'm reposting this as it didn't seem to take the first time. If it's a
dupe, I apologize.)

Hey all. I'm attempting to count the number of unique message IDs from a
Microsoft Exchange 2000 tracking log. While the code below works, it takes
forever to run. Running through a 16mb log file takes like 10 minutes.

If anyone could suggest a better way of doing this, that would be great.
Also, below the PHP code, is an example of an Exchange tracking log (Which
is tab delimited).

Thanks in advance for the help.

John

Here is the code I'm using:

";
?>

Here is an example of the Exchange tracking logs:

2003-10-26  0:0:35 GMT  10.0.0.1file-server -
Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1019
[EMAIL PROTECTED]0   0   799
1   2003-10-26 0:0:35 GMT   0   Version: 5.0.2195.5329  -   -
[EMAIL PROTECTED]-

2003-10-26  0:0:35 GMT  10.0.0.1file-server -
Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1025
[EMAIL PROTECTED]0   0   799
1   2003-10-26 0:0:35 GMT   0   Version: 5.0.2195.5329  -   -
[EMAIL PROTECTED]-

2003-10-26  10:13:43 GMT-   -   -   Exchange-Server -
[EMAIL PROTECTED] 1020
[EMAIL PROTECTED]  0
0   952 1   2003-10-26 10:13:42 GMT 0   -   -   -
[EMAIL PROTECTED]   -

2003-10-26  10:13:43 GMT-   -   SMTP-Server
Exchange-Server -   [EMAIL PROTECTED] 1031
[EMAIL PROTECTED]  0
0   952 1   2003-10-26 10:13:42 GMT 0   -   -   -
[EMAIL PROTECTED]   -

2003-10-26  0:45:59 GMT 192.168.1.2 SMTP-Server.domain.com  -
Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1019
[EMAIL PROTECTED]  0   015188
1   2003-10-26 0:45:59 GMT  0   Version:
95.5329  -   -   [EMAIL PROTECTED]   -

2003-10-26  0:45:59 GMT 192.168.1.2 SMTP-Server.domain.com  -
Exchange-Server 10.0.0.50   [EMAIL PROTECTED] 1025
[EMAIL PROTECTED]  0   015188
1   2003-10-26 0:45:59 GMT  0   Version:
95.5329  -   -   [EMAIL PROTECTED]   -

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Question about empty();

2003-11-18 Thread John
Hi all

This function I don't get at all, I hear all the time, "if you want to
practice smart coding then turn register globals off, and be sure you keep
query data out of your script that is not set or defined with something
expected". So why would there be a function that returns true or false, $var
is empty even if $var is not defined! Now I know you can do bool(), but the
function name (empty()) really states one thing "Does it have a value or (!)
not have value" and not "Does have a value or does (!) not have a value and
may be undefined too!" If you don't want to correct it then at least give a
warning if the $var being tested is undefined!~

This is a function that does more than it should do, and in this case more
is bad!

C, Ya...

John

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Problem in the output of an array

2003-11-29 Thread john
$result = eval( 'return $array'.$test.';' );
Um... 

echo $array[$dim1][$dim2][$dim3][$dim4]; 

eval == evil. I can't think of a single legimiate reason why you'd want/need 
to make a string "[$dim1]" first, and if you have to I'd suspect that 
something is very wrong with the way you are writing your script. 

Feel free to prove me wrong, though :) 

John 



Robert Cummings writes: 

On Sat, 2003-11-29 at 19:47, Robert Cummings wrote:
On Sat, 2003-11-29 at 19:29, [EMAIL PROTECTED] wrote:
> I'm soory but your code doesn't make me understand what you want to do...
> Be more precise, it will help you to get some help
> 
> > I have this code, I would like, if this could be done
> >
> > 
> > $array['dim1']['dim2']['dim3'][3] = "value";
> >
> > $dim1 = 'dim1';
> > $dim2 = 'dim2';
> > $dim3 = 'dim3';
> > $dim4 = 3;
> >
> > $test = "[$dim1][$dim2][$dim3][$dim4]";
> > $result = "$array$test";
> >
> > echo $result;
> > ?>
> >
> > The output is : Array[dim1][dim2][dim3][3]
> >
> > I need that the output was: value 

Ignore my last answer, I read your problem wrong. Answer below: 


$array['dim1']['dim2']['dim3'][3] = "value"; 

$dim1 = 'dim1';
$dim2 = 'dim2';
$dim3 = 'dim3';
$dim4 = 3; 

$test = '[$dim1][$dim2][$dim3][$dim4]'; 

$result = eval( 'return $array'.$test.';' );
echo $result;
?> 

HTH,
Rob.
--
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`' 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP, MySQL and datetime

2003-12-04 Thread John
Guess it matters on which one you want to do the date handling...php or
MySQL.

If it's PHP, I like epoch time, makes manipulating time and dates very
simple (basic math). MySQL has its own timestamp format (the guy above me
mentions it).

Whichever you feel more comfortable with.

John

"Jough Jeaux" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Greetings all, I'm working on a message-board-type application that will
use time stamps to sort part of the messages.  I was wondering what
everyone's favorite way to transfer dates between PHP and MySQL was?
>
> --Jough
>
>
> -
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Cannot send session cache limiter

2003-12-31 Thread john
Hi

I'm new to the list, but I've been PHP programming for almost 2 years now,
hard to believe.

Anyway, I have a program that's giving me a "Cannot send session cache
limiter", yet the very first thing the program does is session_start();

The only thing I can think that's different about this program to others
is that it calls itself. For instance, it outputs a form, the user hits
'submit' and the form action is the same prog .. there are two or three
stages handled like this. I think that's pretty standard, right?

The error only occurs second time around, not when I arrive at the program
from another.

It feels like something at the back end is saying "well, your next program
is the same as your current one, so I won't bother resetting anything",
leading to the error when session_start(); is called the second time
around .. as if I'd issued session_start() halfway through a program.

I'd look it up, but, err, what under? Can anyone shed some light?

Cheers
J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Cannot send session cache limiter

2003-12-31 Thread john
Hi

(apologies if you've seen this, but I sent it and it both came back from
the list server, and it bounced back as a failed email, so I'm going to
try again)

I'm new to the list, but I've been PHP programming for almost 2 years
now, hard to believe.

Anyway, I have a program that's giving me a "Cannot send session cache
limiter", yet the very first thing the program does is session_start();

The only thing I can think that's different about this program to others
is that it calls itself. For instance, it outputs a form, the user hits
'submit' and the form action is the same prog .. there are two or three
stages handled like this. I think that's pretty standard, right?

The error only occurs second time around, not when I arrive at the
program from another.

It feels like something at the back end is saying "well, your next
program is the same as your current one, so I won't bother resetting
anything", leading to the error when session_start(); is called the
second time around .. as if I'd issued session_start() halfway through a
program.

I'd look it up, but, err, what under? Can anyone shed some light?

Cheers
J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Cannot send session cache limiter

2003-12-31 Thread john
> perhaps you could show some code snippets.

Thanks Warren, at least I know my message is getting through :-)

Well, I just got this:

Warning: Cannot send session cookie - headers already sent by (output
started at /home/sites/site191/web/test2/changeAlertDetails3.php4:1) in
/home/sites/site191/web/test2/navigationStart3.php4 on line 4

Warning: Cannot send session cache limiter - headers already sent (output
started at /home/sites/site191/web/test2/changeAlertDetails3.php4:1) in
/home/sites/site191/web/test2/navigationStart3.php4 on line 4

Just after session_start()


from the code:

Just after session_start()");

And that was on first running of a test program with lots of other stuff
stripped out. So it's no longer about the 'second and subsequent times
around', it seems to happen first time too. I'm closing IE6 each time, and
I've 'removed cookies' too.

I think my head's full, so I'm going to leave it now, but I'll be back to
work on it at the weekend. Any clues would be appreciated.

Happy new year,
J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php files not looking right

2004-01-04 Thread John
hi,

i must have downloaded my php files in binary format or something, but now,
instead of readable carriage returns after each line of code, theres a 'box'
and then no carriage return. so the whole file is on one line. then other
files have an extra carriage return between lines. could i remove these with
php and regular expressions?? if so, what should i be searching for, for the
'boxes'

if not, can word or wordpad, or anything else do it. i could go through
every file and delete the box and add a carriage return, but that would take
ages

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Cannot send session cache limiter SOLVED

2004-01-06 Thread john
>> from the code:
>>
>>  >  include 'navigationStart3.php4';
>
> Are these indents in the code (changeAlertDetails3.php4 I think)? You
> can't have anything before the , sorted, thanks everyone

J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] script/binary that tracks links through logs

2004-01-07 Thread John
does anyone know of a program/script that tracks incoming links from site
that youve traded links with. but not a simple php script that requires the
other site to link to www.mysite.com/links_in/12/ but some software that
analyses apache access logs for the referer field. this would mean the other
site would only have to link www.mysite.com and the script/program would do
the rest.

if theres none, im writing one.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] recompiling php

2004-01-18 Thread John
ive a problem with php and mysql, and was told to re-compile php. is this
easy?? i got a box with rhl 9 pre-loaded, with php and mysql installed, but
no apache. so i just downloaded the apache binary. php was installed with
rpm i think. to recompile, do ive to uninstall php firs t(u can guess im
used to windows) or will the new compile just overwrite everything.

--
**
Free Nokia Ringtones US
http://www.ring-tones.us
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Strange PHP Reference behaviour with globals

2001-03-16 Thread John

Hello,

Try the following code:

";
}

function ChangeGlobalRef()
{
global $gGlobal;

$local = 99;
$gGlobal = &$local;
print "Ref:Global=$gGlobal";
}

print "Global=$gGlobal";
ChangeGlobalValue();
print "Global=$gGlobal";
ChangeGlobalRef();
print "Global=$gGlobal";
?>

I get the following results:

Global=1
Value:Global=55
Global=55
Ref:Global=99
Global=55 <=== shouldn't this be 99 ???

Why does setting a global variable to a reference fail in a function?

Tested on PHP 4.0.4 on IIS5 (CGI version).




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Strange PHP Reference behaviour with globals

2001-03-16 Thread John

Thanks Yasuo,

That might explain why $gGlobal is not permanently set to 99,
but that doesn't explain why $gGlobal is set to 55 in ChangeGlobalValue()
permanently. So are you or am I missing something?

Bye, John

""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> This is expected behavior of PHP's reference. Reference works like a
pointer,
> but it dose NOT works like a pointer. This is case  that reference does
not
> works as many programmer expected.
>
> I think this is in manual.
>
> Hint: when programmer use 'global $var'. It is the same as do '$var = &
> $GLOBALS['var']'.
>
> Regards,
>
> Yasuo Ohgaki
> =
> My favorite links
>  [RFC] http://www.faqs.org/rfcs/ [W3C] http://www.w3.org/
>  [PHP Manual] http://www.php.net/manual/en/
>
> > Hello,
> >
> > Try the following code:
> >
> >  >
> > $gGlobal = 1;
> > function ChangeGlobalValue()
> > {
> > global $gGlobal;
> >
> > $local = 55;
> > $gGlobal = $local;
> > print "Value:Global=$gGlobal";
> > }
> >
> > function ChangeGlobalRef()
> > {
> > global $gGlobal;
> >
> > $local = 99;
> > $gGlobal = &$local;
> > print "Ref:Global=$gGlobal";
> > }
> >
> > print "Global=$gGlobal";
> > ChangeGlobalValue();
> > print "Global=$gGlobal";
> > ChangeGlobalRef();
> > print "Global=$gGlobal";
> > ?>
> >
> > I get the following results:
> >
> > Global=1
> > Value:Global=55
> > Global=55
> > Ref:Global=99
> > Global=55 <=== shouldn't this be 99 ???
> >
> > Why does setting a global variable to a reference fail in a function?
> >
> > Tested on PHP 4.0.4 on IIS5 (CGI version).
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Strange Behaviour in non-reference globals?

2001-03-16 Thread John

Hi Yasuo,

Thanks for taking the trouble to explain everything in such detail.

Actually I understood your first message. What it doesn't explain is why:

  $gGlobal == 1  is changed permanently to $gGlobal == 55.

in the following code:

";
}

$gGlobal = 1;
ChangeGlobalValue();
print $gGlobal;  <=== THIS IS 55 NOW

?>


==
""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> - Original Message -
> From: "John" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, March 16, 2001 9:12 PM
> Subject: Re: [PHP] Strange PHP Reference behaviour with globals
>
>
> > Thanks Yasuo,
> >
> > That might explain why $gGlobal is not permanently set to 99,
> > but that doesn't explain why $gGlobal is set to 55 in
ChangeGlobalValue()
> > permanently. So are you or am I missing something?
>
> Reference in PHP is not actually a pointer. It's a common pithole for
C/C++
> programmers.
> In C/C++, you will get 99, instead of 55. But we get 55 in PHP. Here is
why.
>
> Reference is just a place holder for a value.
>
> Your code creates referece with "global" statement asI wrote in previous
mail.
>
> global $var;
>
> creates reference to $GLOBAL['var'] for local $var IN function scope.
>
> $var is actually a reference, NOT a variable itself nor a pointer.
>
> > > > function ChangeGlobalRef()
> > > > {
> > > > global $gGlobal;
>
> Creating reference here, for $GLOBAL['gGlobal'].
>
> > > >
> > > > $local = 99;
> > > > $gGlobal = &$local;
>
> You assign reference of "$local" to "$gGlobal" which is also a reference.
>
> $gGlobal = &$local;
>
> This replaces $gGlobal(reference) with $local(reference).
> Your code does not change $GLOBAL['gGlobal'], which is the value you want
to
> change.
>
> > > > print "Ref:Global=$gGlobal";
> > > > }
>
> Since your code replace reference with reference inside function scope.
> You get $gGlobal = 99 inside the function, but not outside the function.
> (Note: Your $gGlobal is refered to $local that has 99 in the function)
> Because $gGlobal itself is local to the function.
>
> Therefore, you cannot get 99 outside the function, but 55.
>
> I hope I explained well, so that all readers understand what I'm talking
about.
>
> Regards,
> --
> Yasuo Ohgaki
>
> > Bye, John
> >
> > ""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > This is expected behavior of PHP's reference. Reference works like a
> > pointer,
> > > but it dose NOT works like a pointer. This is case  that reference
does
> > not
> > > works as many programmer expected.
> > >
> > > I think this is in manual.
> > >
> > > Hint: when programmer use 'global $var'. It is the same as do '$var =
&
> > > $GLOBALS['var']'.
> > >
> > > Regards,
> > >
> > > Yasuo Ohgaki
> > > =
> > > My favorite links
> > >  [RFC] http://www.faqs.org/rfcs/ [W3C] http://www.w3.org/
> > >  [PHP Manual] http://www.php.net/manual/en/
> > >
> > > > Hello,
> > > >
> > > > Try the following code:
> > > >
> > > >  > > >
> > > > $gGlobal = 1;
> > > > function ChangeGlobalValue()
> > > > {
> > > > global $gGlobal;
> > > >
> > > > $local = 55;
> > > > $gGlobal = $local;
> > > > print "Value:Global=$gGlobal";
> > > > }
> > > >
> > > > function ChangeGlobalRef()
> > > > {
> > > > global $gGlobal;
> > > >
> > > > $local = 99;
> > > > $gGlobal = &$local;
> > > > print "Ref:Global=$gGlobal";
> > > > }
> > > >
> > > > print "Global=$gGlobal";
> > > > ChangeGlobalValue();
> > > > print "Global=$gGlobal";
> > > > ChangeGlobalRef();
> > > > print "Global=$gGlobal";
> > > > ?>
> > > >
> > > > I get the following results:
> > > >
> > > > Global=1
> > > > Value:Global=55
> > > > Global=55
> > > > Ref:Global=99
> >

[PHP] Newbie help please!

2002-05-15 Thread John

Hello,

I am about 3 hrs old with php and have a very simple question. I
have a test.html page that is just an href and I want to put the variables
into php variables on the next page but I get an error. Could someone please
correct my code or tell me what is wrong. We use IIS NT 4.0 MySQL. We have
installed PHPBB and it works great!  Thanks in advance for your time.

test.html code


 Untitled



Click here



test.php code


error messages---
Notice: Use of undefined constant user - assumed 'user' in
\\SERVER\web\phpBB2\test.php on line 3

Notice: Use of undefined constant pass - assumed 'pass' in
\\SERVER\web\phpBB2\test.php on line 4
userpass



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Newbie help please!

2002-05-15 Thread John

Tommy,
Thanks that was it.
"Tommy Claasens - Q Data Kzn" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
>
> Try this
>  $username = $_GET['user'];
> $password = $_GET['pass'];
> echo $username;
> echo $password;
> ?>
>
> -Original Message-
> From: John [mailto:[EMAIL PROTECTED]]
> Sent: Wed, 15 May 2002 16:46
> To: [EMAIL PROTECTED]
> Subject: [PHP] Newbie help please!
>
>
> Hello,
>
> I am about 3 hrs old with php and have a very simple question. I
> have a test.html page that is just an href and I want to put the variables
> into php variables on the next page but I get an error. Could someone
please
> correct my code or tell me what is wrong. We use IIS NT 4.0 MySQL. We have
> installed PHPBB and it works great!  Thanks in advance for your time.
>
> test.html code
> 
> 
>  Untitled
> 
> 
> 
> Click here
> 
>
>
> test.php code
>  $username = user;
> $password = pass;
> echo $username;
> echo $password;
> ?>
>
> error messages---
> Notice: Use of undefined constant user - assumed 'user' in
> \\SERVER\web\phpBB2\test.php on line 3
>
> Notice: Use of undefined constant pass - assumed 'pass' in
> \\SERVER\web\phpBB2\test.php on line 4
> userpass
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] fsockopen and https

2001-10-25 Thread John

Hello All,

I am new to this list and am sure most of you are tired of this subject
appearing.  Please forgive me as I am becoming tired of searching archives
and the internet and I am hoping someone here can help me.

I am using fsockopen to post data to a dll on a SSL server.  I setup the
socket data and successfully posted the data to port 80 but as soon as I
switch to port 443 I received no errors or text.

Yes I am trying to interface with an authorize.net compatible gateway and I
know most of you will tell me the only way to do this is with cURL but I am
finding that hard to believe.  I recently had someone tell me PHP scripts
over an HTTPS connection would not parse; this person said the code of the
script would appear. I told him this was interesting as I have PHP scripts
running under HTTPS connections without cURL.  Anyway, back to the point;  I
am trying to talk with an IIS server and need to figure out what needs to be
done to make this return the results properly.  Am I missing something in my
headers?  All I am doing is connecting to the server and making a POST
/gateway/transact.dll?var1=xyz&var2=abc etc.  Here's the code used:

   $sgate = fsockopen($URL,80,&$errno,&$errstr,30);
if(!$sgate)
{
die("$errstr ($errno)\n");
}
else
{
fputs($sgate," /gateway/transact.dll?$postSTR HTTP/1.0\n\n");
while(!feof($sgate))
{
$result.=fgets($sgate,1024);
}
}
fclose($sgate);

This portion works perfect until I change the port to 443; Please if it is
possible to do this without cURL I would appreciate the help.

Thanks,

-John-



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] fsockopen and https

2001-10-27 Thread John

From: "Brad Hubbard" <[EMAIL PROTECTED]>

> > I am using fsockopen to post data to a dll on a SSL server.  I setup the
> > socket data and successfully posted the data to port 80 but as soon as I
> > switch to port 443 I received no errors or text.
>
> Does this help? I use this on web servers to test whether a transaction
> server is available or not. Only works on *nix of course (sorry Bill :-)
>
> 
> $ph = popen( "/usr/bin/openssl s_client -connect
secure.geicp.com:443 -quiet
> 2>/dev/null < $response = fgets( $ph, 1024 );
>
> if( stristr( $response, "200 OK" ) )
> {
> header( "Location: https://a.secure.server.com"; );
> exit;
> }
>
> ?>

Excellent!  This is exactly what I needed.  I now have a class interfacing
with my gateway and do not need cURL!

Thanks a bunch!

-John-



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP with Win2k or Linux

2001-04-05 Thread John

Watch out for

1. file names are case sensitive on Unix.  Even mysql table names are
case-sensitive on Unix.
2. behaviour of environment/server variables is sometimes different.

The plus side is PHP on Linux tends to be more reliable and more extensions
work.

Regards, John

""Frank K"" <[EMAIL PROTECTED]> wrote in message
001401c0bd76$44529fb0$c6483018@frankk">news:001401c0bd76$44529fb0$c6483018@frankk...
Does anyone know is there are advantages to running linux while developing
php? I just would like to know if there is anything special to installing
and developing on linux  before I move from Win2k??

Thanks,
-Frank




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problems porting from MySQL Server to MSSQL7 Server

2001-04-05 Thread John

Hello Adrian,

There are some concurrency issues with mssql if you are using
mssql_pconnect. Try switching to mssql_connect. Also check to see if
transactions are enabled in mssql.

Your SQL insert syntax looks ok.

Regards, John

PS: for porting mysql to mssql, have a look at http://php.weblogs.com/adodb
for the ADODB database wrapper library.


""Adrian Jurjica"" <[EMAIL PROTECTED]> wrote in message
001401c0bd38$51d05580$[EMAIL PROTECTED]">news:001401c0bd38$51d05580$[EMAIL PROTECTED]...
Can anyone help me?
Today I was informed that the backend for my project will not be MySQL, but
MSSQL 7.0. No problems, I said, but after porting database from MySQL to
MSSQL I find that the UPDATE statement doesn't work. Strange is that INSERT
statement in a php query does not work second time (ie, i made a script for
taking records from MySQL and insert in MSSQL; first query work, but second
doesn't).
Code is here:

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");
$rez_q=mssql_query($query,$conn) or die("Error: Invalid SQL");
}

The same code and function work fine in MySQL. Why doesn't work in MSSQL
Server???

Adrian JURJICA

Tel.: +40-94-128879
E-mail: [EMAIL PROTECTED]

Nu ocoliti pe Internet:
http://oneblackcat.f2s.com
http://www.terrasat.ro
http://www.transcondor.com
http://aimmr.go.ro





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Crack extension

2001-04-05 Thread John

Hi AZ,

Where can we get it, what does it do, and do we smoke it?

Regards, John

PS: Last is a joke, but I am sincerely curious -- what does it do?

<[EMAIL PROTECTED]> wrote in message
9agj7e$7ba$[EMAIL PROTECTED]">news:9agj7e$7ba$[EMAIL PROTECTED]...
> Anyone using the crack extension in PHP?
>
> AZ
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Zend IDE 1.10 and Debugger Mini-review

2001-04-09 Thread John

http://php.weblogs.com/zend_ide_debugger
"But we didn't get the Zend IDE to do typing. We want to use it for the
Debugger stuff. Now global and local variables are visible in the Variables
tab. You can drill down into arrays and objects to look at their values."



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Finer points of debugging: vardump vs. print_r

2001-04-09 Thread John

Hi Morgan,

You tip is fantastic. Will post it (with your permission) at my weblog,
http://php.weblogs.com/ tomorrow.

Regards, John

"Morgan Curley" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I generally include the following function:
>  function dump( $label, $input ){
>  echo( "" );
>  echo( "$label\n" );
>  print_r( $input );
>  echo( "" );
>  return 1;
>  }
>
> or if you like javascript this pops up an alert wherever you insert the
> dump call in your page
>  function dump( $label, $input ){
>  ob_start();
>  print_r( $input );
>  $gc = ob_get_contents();
>  ob_end_clean();
>
>  $gc = preg_replace( "/'/", "\\'", $gc );
>  $gc = preg_replace( '/\n/', '\\n', $gc );
>  echo( "alert( '$label\\n".$gc."' );" );
>  return 1;
>  }
>
> then for simple debugging I call
> dump( "My Label", $my_var );
>
> With the javascript you can do some cool things like having divs generated
> per $label.
>
> morgan
>
>
>
> At 02:26 PM 4/9/2001, you wrote:
> >Just a question that has been besetting me for a while:
> >
> >which is better for debugging -- vardump( ) or print( ) ?
> >
> >Does anyone have a preference? Why? Is one better than the other?
> >Thanks for answering this prickly question!
> >
> >John Lim
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] How to display a mirror image of a jpeg file

2004-08-06 Thread john
Hi

Is it possible, in PHP, to display a mirror image of the stored file? I've
looked through the GD library and it has rotate, but not reflect. I've
Googled too but didn't find anything.

I'm just trying not to have to store/save my images twice .. one for this
way around, another for thatta way around.

J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to display a mirror image of a jpeg file

2004-08-06 Thread john
> Is it possible, in PHP, to display a mirror image of the stored file?

A friend pointed me to the first comment here
, so I may be sorted,
thanks.

J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Destroying a Session

2004-08-25 Thread john
>> function clear_orderinfo() {
>>   global $_SESSION;
>>   unset($_SESSION["orderinfo"]);
>>  }
>>
>> However this function doesnt seem to work and the session remains
>> active, is
>> there another way to clear a session?

I'm not triffically experienced, but I do have notes on the subject.
You're wanting to clear the whole session, right?

$_SESSION=array();
session_destroy();

For specific variables, try assigning FALSE to it
($_SESSION['name']=FALSE; or 'unset' works for versions >=4.2.2. Otherwise
use session_unregister. For me under 4.1.2 I had to set to null.

HTH
J



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Capturing an Image of a web page

2004-09-15 Thread john
> Has anyone run across a tool available to PHP that can render an image of
> a
> entire webpage from a URL, so that it can be reduced to a thumbnail and
> stored in a database?

I'm sure this has been discussed and solved on/in TheList (Evolte) but
I've just searched the archive and not found it. Probably the solution
wasn't PHP tho, but at least it was automated. Anyway .. you could join
theList and ask there.

Cheers
J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] advise on consulting fees

2007-03-02 Thread John
This may be deviating a bit from the intent of the list, and someone feel
free to say so if the list shouldn't be used for this. My apologies in
advance if that is the case. This is NOT a self-advertisement!

 

My question is regarding the "going rate" for software development
consulting - 

 

Currently, my clients are mostly companies requesting graphic design and web
development for websites, and my rate is 65-85 an hour, quoted per project.

 

I have a large prospective client who is looking for a consultant for
development and support for ongoing software projects, and I'm wondering how
differently a client of this size/nature would be handled. They'd be looking
at around 100-150 hours a month on a continual basis. 

 

I recognize it is a bit different than my other clients who are usually
single projects that are opened and closed fairly quickly, but would 65-85
an hour be reasonable and fair? I know there are a lot of variables that
would affect it, but generally, what would be a "competitive" rate?

 

Feel free to respond to me privately rather than to the list.

 

I appreciate any suggestions and insight that anyone may offer!

 

Thanks

 

J

 

 

 

 

 

 

 



[PHP] user permissions

2009-08-27 Thread John
Hi,



What is the best way to assign permissions to users?



a)  Each user has a list of permissions associated with that user or

b)  Each task/permission has a list of users that qualify or

c)   Have a table with a row for each user/permission combination



Thanks!



John



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: SEO Experts?

2010-09-27 Thread john

> On 9/26/2010 8:09 AM, David Mehler wrote:
>> Hello,
>> Do we have any SEO experts on this list? I'm not one, learning only,
>> reading a book and a few articles/tutorials from webmasters, and I'm
>> wanting to optimize an existing site to get the best search rank
>> possible. Some techniques, dos and don'ts would be appreciated.
>> Thanks.
>> Dave.

Sure, it's what I do.

Well first you need to work out which keyphrases to optimise for, and
that's not obvious. Search Google for "keyword tool external" to find a
Google tool that tells you something about the demand for a phrase and the
competition for it.

What you are trying to find are phrases that a) are very very relevant to
your client, b) have lots of demand traffic, and c) don't have too much
competition.

The other thing to check is whether anyone else is making money at your
selected phrases, so search for them in Google and see if people are
advertising.

Then group your phrases: so "wet dog" becomes a keyphrase group that
includes phrases like "getting rid of wet dog smell", "avoiding wet dog
shake" and so on.

You are building a site to satisfy the keyphrase groups you've identified,
so then one way or another you want a "wet dog" page that's optimised for
that phrase, which means you mention "wet dog" a few times especially in
the headline and page title and don't mention lots of other things.

Then you want some links from other people's pages, Twitter, Delicious,
YouTube and so on to your wet dog page, preferably text links that include
the phrase "wet dog".

Then you watch your Analytics data to check that people who arrive on your
site are satisfied and covert into sales (or signups or whatever you are
doing). If not, you run a Google Website Optimizer test to improve things
like your headline, photos and so on.

If you like, run through http://www.flowmarketing.co.uk and fill in the
form where you get stuck. It's obviously a work in progress :-) and I'll
complete the page that you end up at.

By all means email me the website and I can be more specific.

Good luck :-)

Cheers
J
http://www.johnallsopp.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Open source curiosity

2005-04-06 Thread john
Hi

Just out of curiosity, if you write your PHP under an open source
licence, how do you hide the codes to get into your database?

J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] MySQLi group

2005-05-02 Thread john
Caio,
I have started a new group for those of us here that may run into
issues specifically with MySQLi in PHP5.
http://groups-beta.google.com/group/MySQLi
Regards,
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Hello, I'm new...

2005-05-13 Thread john
> --
> jamwil.com

Also, when I hit reply to James' reply, the "to" field in my email
client was only sending to James, not to the list.

How so? I've noticed that before. How can sometimes the responses go
to the list, and other times to the person who sent the message?

And isn't there a correct protocol for this somewhere?

J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Hello, I'm new...

2005-05-13 Thread john
>> I would like to create a 'community' website and was wondering if
>> there
>> was a framework available to get me started?

Well now I don't even know what a framework is. I was expecting
someone to say "Oh, you should use model view controller" or
something.

All the answers seem to be applications.

Are applications frameworks?

J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [thelist] SEO

2005-05-14 Thread john
> For example:
>
> mysite/sweaters/
>
> (I think) is better than:
>
> mysite/index.php?section=1&content=23&style=5.

It's more usable I guess. What handles that though? I'm finding it
hard to organise the back end of that in my head.

I don't think there's any way around that ending up looking for an
index file in the sweaters directory. So then you're ending up with
lots of index files. Maybe they could redirect to the one program that
answers the query, but it's still quite messy. I agree however that
user mess should be reduced even if it increases implementation mess.
The user wins over the developer.

But, in the directory method there's only one way to segment the
clothes. You're predefining the routes people would take. For
instance, here you're saying people will select sweaters, maybe shoes,
then maybe hats in separate transactions.

Personally, I know blue suits me, so I'd want to see all the blue
things in the shop.

I'm also 6'6" tall and take size 14 shoes, so I want to know which of
those blue things fits.

My way caters for that. It allows the user to get what they want from
my database.

The next person may want rainwear, or beachwear.

The directory method gives a very lightweight version of usability. It
might even be argued that it puts a straightjacket around the way
people select items. Surely usability, if it gives anything, provides
an understanding of the breadth of people's requirements. Or maybe I'm
thinking more of functionality than usability.

J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Hello, I'm new...

2005-05-14 Thread john
> When I recently looked at
> asp.net, Microsoft had a Community starter kit/framework which
> included all
> the basic modules/applications needed to get such a site up and
> running and
> detailed documentation about it's design and implementation.

I've not looked at asp, but that sounds like a completely different
world. Maybe the equivalent is to find an open source application that
does pretty much what you want and use that, even join in with its
development. Check in sourceforge or freshmeat.

AFAIK, PHP doesn't offer that kind of packaged approach. Perhaps
there's a major difference between the way MS approaches things and
the way PHP/open source does.

J

PS. there it is again, hit reply and the 'to' address is the email
sender, not the list. How so?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Hello, I'm new...

2005-05-14 Thread john
>> PS. there it is again, hit reply and the 'to' address is the email
>> sender, not the list. How so?
> Is there a 'reply to all' button on your mail client. Some mailing
> lists add a 'Reply-to' header asking all clients to redirect replys to
> the list. PHP-general doesn't have such a feature.
>
> I know it gets annoying at times.

Oh yers. I don't think I've ever used that before. How irritating :-)

J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] $PHP_SELF problem

2004-04-20 Thread john
Hi

$thisFileName = $PHP_SELF; works in a file just a few lines after the
program start.

$thisFileName = $PHP_SELF; doesn't work (echo ("Debug: self:
$PHP_SELF"); returns Debug: self: ) if it's within function
getNavigation() in the Navigation object called by another program.

Why?

The Navigation object is called like this:
include ("Navigation.php4");
$myNavigation = new Navigation ("a", "b");
$myNavigation->getNavigation();

I guess I'm asking $PHP_SELF something confusing. Does it respond
"index.php4" which is where the above three lines reside, or
Navigation.php4 which is where the actual $PHP_SELF resides.

All help appreciated :-)

Cheers
J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] A security thing or just sessions working?

2004-04-24 Thread john
Hi

I had a problem with what my host called "a spate of insecure PHP
applications being used to upload proxying applications" which I think has
been solved, however I've just spotted this when trying to validate my
HTML:



The HTML validator wants the  to be within the . Problem
is, I didn't put the  in there, it's just appeared.

So. Should it be there? Is this just sessions working like they should?
I've never seen it before.

Or have I got Russian Big Boobs all over again :-)

J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] A security thing or just sessions working?

2004-04-24 Thread john
Hi

I had a problem with what my host called "a spate of insecure PHP
applications being used to upload proxying applications" which I think has
been solved, however I've just spotted this when trying to validate my
HTML:



The HTML validator wants the  to be within the . Problem
is, I didn't put the  in there, it's just appeared.

So. Should it be there? Is this just sessions working like they should?
I've never seen it before.

Or have I got Russian Big Boobs all over again :-)

Oh, I just put the site onto a different server on a different host and
didn't get the PHPSESSID thing inserted.

J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] A security thing or just sessions working?

2004-04-24 Thread john
Hi

I had a problem with what my host called "a spate of insecure PHP
applications being used to upload proxying applications" which I think has
been solved, however I've just spotted this when trying to validate my
HTML:



The HTML validator wants the  to be within the . Problem
is, I didn't put the  in there, it's just appeared.

So. Should it be there? Is this just sessions working like they should?
I've never seen it before.

Or have I got Russian Big Boobs all over again :-)

Oh, I just put the site onto a different server on a different host and ..
I've taken another look, I did get the PHPSESSID thing inserted, so I
guess it's standard stuff.

J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] thumbnails of images

2004-05-10 Thread John
is there any code or function out there that gives you a thumbnail of an
image in the size and compression means you specify?? ive been looking, but
found nothing, youd think thered be a function

--
**
Free Nokia Ringtones US
http://www.ring-tones.us
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Piping new email to a PHP file

2004-05-22 Thread John
Hi,
I'm sorry if this has been asked many times before but how do I pipe new
email to a file instead of to a mailbox? I tried adding an alias to a file,
but it bounced and said 'Can't write output', then I tried to pipe it to a
program (the php interpreter) like this "|php /home/php-script.php"
and that didn't work either.

Basically, what I'm trying to achieve is to have all new email sent to a
certain address parsed and inserted into a database. I want to do this with
PHP, which I'm comfortable with, but I don't know where to start.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] imagemagick

2004-06-07 Thread John
this might be a small bit o f f t o p i c but im trying to install
imagemagick and running into a problem. im trying to crop JPEGs but
imagemagick says it has no 'image decode' for that file type! upon closer
inspection, it looks like youve to enable jpeg while configuring an install.
but could anyone tell me how to do this? im trying to install on a standard
red hat linux 8 box.
thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] .htaccess file

2004-07-05 Thread John
what are the files permissons?
of these are set wrong it could cause your problem

On Mon, 05 Jul 2004 10:58:54 +0200, VÃclav SlovÃÄek <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> I have a problem, but maybe it's more about Apache than about PHP. I need
> to access a Apache .htaccess file from PHP and modify it, but I always get
> "access denied" error. Could you help me, with solving this problem?
> Thank you.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
John 
[EMAIL PROTECTED]
http://www.whp.co.uk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] passing sessions with header()

2007-06-19 Thread John
The php.net manual states:

 



Session ID is not passed with Location header even if session.use_trans_sid
is enabled. It must by passed manually using SID constant.



 

How should the SID be passed manually? I'd like to keep the SID out of the
uri, so is a POST variable the best way to handle that?

 

My problem is that I'm trying to keep a session persistent through a
header() redirect. which when left to it's own, looses all association to
the session .

 

 

Thanks!

 

J

 

 

 



RE: [PHP] passing sessions with header()

2007-06-19 Thread John
> Just stick it on the end of the URL...

I'd like to keep it out of the URL if possible...

J


> -Original Message-
> From: Stut [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 19, 2007 1:45 PM
> To: John
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] passing sessions with header()
> 
> John wrote:
> > The php.net manual states:
> >
> > 
> >
> > Session ID is not passed with Location header even if
> session.use_trans_sid
> > is enabled. It must by passed manually using SID constant.
> >
> > 
> >
> > How should the SID be passed manually? I'd like to keep the SID out of
> the
> > uri, so is a POST variable the best way to handle that?
> >
> > My problem is that I'm trying to keep a session persistent through a
> > header() redirect. which when left to it's own, looses all association
> to
> > the session .
> 
> Just stick it on the end of the URL...
> 
> header('Location: http://domain.com/dir/script.php?'.SID);
> 
> Or, if you already have a querystring...
> 
> header('Location: http://domain.com/dir/script.php?a=b&;'.SID);
> 
> -Stut
> 
> --
> http://stut.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP Brain Teasers

2007-07-03 Thread John
My two bits...



if (goose($its))
{
$gander = $its;
}

-and-

for ($things = 1; $things > 0; $things++)
{
   for ($x = 0; $x < $things; $x++)
   {
  $they = "the same";   
   }
}



John




> -Original Message-
> From: Daniel Brown [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 03, 2007 3:13 PM
> To: Jay Blanchard
> Cc: Paul Novitski; php-general@lists.php.net
> Subject: Re: [PHP] PHP Brain Teasers
> 
> On 7/3/07, Jay Blanchard <[EMAIL PROTECTED]> wrote:
> > Another...(way easy)
> 
> Y'think?  Heh.
> 
> > $one = "six";
> > $other = "half-dozen";
> 
> 
> --
> Daniel P. Brown
> [office] (570-) 587-7080 Ext. 272
> [mobile] (570-) 766-8107
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] extracting the file name from the referrer

2006-11-17 Thread John
I need to extract just the filename from the referring url, stripping it of
the path and any post vars on the end. there's got to be an easier way than
this eh?

 

$referrer = trim(strrchr(substr($_SERVER['HTTP_REFERER'],0,
strpos($_SERVER['HTTP_REFERER'],"?")), "/"), "/")

 

Thanks!

 

-JP

 

 

 



RE: [PHP] extracting the file name from the referrer

2006-11-17 Thread John
R> you may want to look at the parse_url and explode functions.

Thanks, I'll look into that

R> you do realize that the referer, should it exist <...>

Good point, thanks for pointing that out.  Yes, I was aware of that it
didn't come to mind.  The security isn't so much an issue as that's already
handled, though if someone has their referrers turned off, it would be a
problem.

I'm trying to establish three things before I do a block of processing

a) a form was submitted
b) a processing flag was previously set to process
c) the form/data being submitted/processed is from the correct page - which
was where the referring url came in.

Any other suggestions or alternatives for c?






-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Friday, November 17, 2006 5:41 PM
To: John
Subject: Re: [PHP] extracting the file name from the referrer

you may want to look at the parse_url and explode functions.

you do realize that the referer, should it exist, is of questionable
value? with various browsers the user can set it to a value of their
liking or simply turn it off. also various firewall products strip it
out for privacy reasons.


  - Rick

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php mysql problem

2006-05-02 Thread John

Ross wrote:
This is my database now...I will use the item_id for the order but what if I 
want to change item_id 3 to item id 1? How can I push all the items down one 
place? How can I delete any gaps when items are deleted.



CREATE TABLE `board_papers` (
  `id` int(4) NOT NULL auto_increment,
  `doc_date` varchar(10) NOT NULL default '-00-00',
  `article_type` enum('agenda','minutes','paper') NOT NULL default 'agenda',
  `fileName` varchar(50) NOT NULL default '',
  `fileSize` int(4) NOT NULL default '0',
  `fileType` varchar(50) NOT NULL default '',
  `content` blob NOT NULL,
  `item_id` int(10) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;



-- snip --
Hi Ross,

You can reuse item_id after they have been deleted. So when you delete
item_id = 1, then next time you perform an insert, lookup the lowest
free item_id number and give it as the item_id. That's one small solution.

If you actually want to rank your records by more than just the item_id,
then define a field for each kind of rank you want, or better, add it as
a separate table, like:

board_papers -< rank
* id
* board_papers_fk <-- id from board_papers
* rank_type (example: readability, technicality...)
* rank_no (rank within the rank type)

Then you can order the board_papers after rank as you like!

Just an idea :)

Enjoy,
   John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php mysql problem

2006-05-02 Thread John

Ross wrote:
This is my database now...I will use the item_id for the order but what if I 
want to change item_id 3 to item id 1? How can I push all the items down one 
place? How can I delete any gaps when items are deleted.



CREATE TABLE `board_papers` (
  `id` int(4) NOT NULL auto_increment,
  `doc_date` varchar(10) NOT NULL default '-00-00',
  `article_type` enum('agenda','minutes','paper') NOT NULL default 'agenda',
  `fileName` varchar(50) NOT NULL default '',
  `fileSize` int(4) NOT NULL default '0',
  `fileType` varchar(50) NOT NULL default '',
  `content` blob NOT NULL,
  `item_id` int(10) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;



-- snip --
Hi Ross,

You can reuse item_id after they have been deleted. So when you delete
item_id = 1, then next time you perform an insert, lookup the lowest
free item_id number and give it as the item_id. That's one small solution.

If you actually want to rank your records by more than just the item_id,
then define a field for each kind of rank you want, or better, add it as
a separate table, like:

board_papers -< rank
* id
* board_papers_fk <-- id from board_papers
* rank_type (example: readability, technicality...)
* rank_no (rank within the rank type)

Then you can order the board_papers after rank as you like!

Just an idea :)

Enjoy,
   John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Xml documents to html

2004-01-26 Thread John
Hi,

How can I show xml files which have been created in MS Word, in a browser as
ie Html.

Is this posible and what would it take.

Thanks

John

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Code help - file parse?

2004-01-30 Thread john
Looking for code help: When my php script inserts data into the database I'd
like to parse an html page for a date and replace it with the current date.
This way visitors to the main html page can see the last time the database
was updated. I know I could re-write the html page using php but would
rather leave it html. Anyone have code to parse and replace based on a
hidden tag?

Thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Imagejpeg and image size question

2004-02-12 Thread John
Hi,
I am new to manipulating JPGs using PHP. But i managed to create an
application that displays an JPG image in the browser (see below).

I have boiled the code down to the most nesesary.

My problem is that when i load the file "c:\file.jpg" directly in the
IE browser (using ), and then get properties on the
image by
right clicking in the browser. the size is the same as it is on the HD
(83Kb).

However when i use the PHP code and get properties on the image by
right clicking in the browser. the image size is 264Kb.

How come the picture is bigger when loaded trough PHP as it is when
loaded trough the browser directly ?

best regards
John


<-generate_jpg_picture.php starts--->

<-generate_jpg_picture.php ends--->
<-some_file.php starts--->


PHP Test


 
 


<-some_file.php ends--->

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] header(Location: question

2004-02-29 Thread John
when you use a command like this:
header("Location: http://www.highbandwidhtmirror.com/videos/download.mpg";);

Is the user downloading off the mirror site or is your server downloading
from the mirror and passing on to the end user. I want to save bandwidth by
having mirror urls of funny videos, so will this work?

--
**
Free Nokia Ringtones US
http://www.ring-tones.us
**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Very simple forms processing question

2004-03-08 Thread john
Hi

I want to set up a mailing list on a site, and I want a very simple
register/deregister facility. So a text field for the email address, then
an [add] button and a [remove] button.

Now, what I really want is for both [add] and [remove] to be 'submit' type
HTML buttons for the same form, but at the destination script I don't know
how to tell which button was pressed, and I've a feeling I should only
have one submit button.

I can do what I want JavaScript, but can I do it just with PHP?

Any clues, or am I not being clear?

Cheers
J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] array search

2005-01-23 Thread john
> I've been trying for days now to make this work.

This worked for me (with my IP address for 'John'):

"Mark",

"63.230.76.166"=>"Bob",

"84.196.101.86"=>"John",
);

function _array_search ($viz_ip, $byte_ip) {

foreach($byte_ip as $key => $val) {

if ($viz_ip === $key) {
return($val);
}

}

return(False);
}



?>


Hi 

J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] calling a php function

2002-11-26 Thread John Nichel
No, you can't.  PHP is run on the server side.  JavaScript is client side.

Adrian Partenie wrote:

Hello,

Can I call a php function using forms in the same way as I do for a javascript function? (in the same page, not with php_self).







.



Thanks, Adrian



--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: decimal places

2002-11-26 Thread John Herren
http://www.php.net/manual/en/function.number-format.php

number_format() can also give you commas if you like.

Bryan Koschmann - Gkt wrote:

> Hello,
>
> Does anyone here have a good way to make sure dollar amounts are formatted
> properly? I have something that returns data, but the problem is it's
> stored where any trailing zero isn't kept, like this:
>
> $16.95 or $172.82 are fine
>
> $17.90 or $190.20 come back as $17.9 and $190.2
>
> I would like to make sure they are all properly formatted. Any ideas?
>
> Thanks in advance,
>
> Bryan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] URL hiding

2002-11-26 Thread John Nichel
Have you index.php page as a frameset, and load all pages into the 
frameset.  No matter where the user is on your site, they'll just see 
http://www.whatever.com

Kris wrote:
Hi

When I pass variables to a new page in the address bare of the browser it looks like

www.whatever.com/index.php?uName=Kris&passWd=1234

How can I hide this so it's just

www.whatever.com/index.php or even better just

www.whatever.com

thanks

Kris





--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Detecting email bounces sent by the mail function?

2002-11-29 Thread John Nichel
To the best of my knowledge, there is no way to do this with the mail 
function.  However, I check for bounces using Perl and a cron.  I don't 
see why you couldn't use php to do the same thing though.

Ade Smith wrote:
Hello

Is it possible to detect with PHP whether an email sent using the PHP
'mail' function has bounced back or has not been delivered?

I currently all ready check the email address using the 'ereg' function
before the mail function is called, but this only checks the format is
valid beforehand.

Ade





--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] First PHP

2002-11-29 Thread John Nichel
Maybe if you're lucky, "the father of PHP" will reply to you. :)

heikkikk wrote:

Hello!

I would like to know, Who made the first step to start programming PHP?
So who is the father of PHP.
Can anyone give me a link to proof it?



--
=|---+---|=
Heikki Kniivilä
[EMAIL PROTECTED]
http://heikkikk.homelinux.com






--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How do I run a command as root?

2002-12-02 Thread John Wards
On Monday 02 Dec 2002 10:47 am, Luke van Blerk wrote:
> Hi
>
> I'm trying to find out how to run a command on the server as root. Does
> anybody know how to do this?
>

su root
password: your_root_password

then run your command

This is a php list not a *nix list

John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: Re[2]: [PHP] need advice on template engine

2002-12-03 Thread John Wards
On Tuesday 03 Dec 2002 2:28 pm, Daniel Masson wrote:
> Ive been working with smarty and for me its awsome ... My advice is
> SMARTY !!!
>

I've just converted my 100,000 page views a day application to SMARTY and it 
is much quicker and it gives me much more control

Go for smarty it rocks..

John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] "x" as a multiplier

2002-12-03 Thread John Meyer
Code:

$newwidth . "x"  . $newheight


What I want to get out is a string, like 89x115.  All I am getting though,
is one number, even though  if I do this

$newwidth . " x "  . $newheight

It prints out just fine.  What is going on here?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] "x" as a multiplier

2002-12-03 Thread John Meyer
Exactly.  But it's only giving me one of the numbers without the space
between the numbers and the x.

-Original Message-
From: Adam Williams [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 3:48 PM
To: Kevin Stone
Cc: John Meyer; [EMAIL PROTECTED]
Subject: Re: [PHP] "x" as a multiplier


I don't think he's trying to multiply, I think he wants to print #x#, like
800x600 or 1024x768, etc...

Adam

On Tue, 3 Dec 2002, Kevin Stone wrote:

> Is it possible you're mistaken somehow?  x isn't an operator in PHP.
> Executing $a x $b will give you a parse error.  Anything in quotes is
> automatically casted as a string.
> -Kevin
>
> - Original Message -
> From: "John Meyer" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, December 03, 2002 3:20 PM
> Subject: [PHP] "x" as a multiplier
>
>
> > Code:
> >
> > $newwidth . "x"  . $newheight
> >
> >
> > What I want to get out is a string, like 89x115.  All I am getting
though,
> > is one number, even though  if I do this
> >
> > $newwidth . " x "  . $newheight
> >
> > It prints out just fine.  What is going on here?
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Cold Fusion conversion issues: app vars and cached queries

2002-12-04 Thread John Lim
Hi Steve,


"Steve W" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> My company is looking to move our site away from Cold Fusion due to
> the cost. We had talked about JSP, but I would highly prefer PHP.
> After evaluation, with the generic database functions now supporting
> Oracle in CVS, I think this might be a possibility. However, there are
> 2 concerns I have in converting from Cold Fusion.
>
> 1) Application variables

See http://php.weblogs.com/php_application_variables

> 2) Cached queries

And the ADOdb class library supports cached sql queries

http://php.weblogs.com/adodb


>
> I've seen some solutions to both problems, but mainly I want the
> solution to meet one and ideally both of the following qualifications.
> First, I don't want to have to use an add in module. I'd like to only
> use core PHP functions and modules that are part of the full PHP
> distribution and not SRM or other add-on modules. Second, I'd prefer
> not to have to serialize the results, save as a file, and read the
> file as updates would seem to become more difficult on higher load
> systems with having to update files. Updates to our cached queries and
> application variables generally only occur a few times a day.
>

If it only occurs a few times a day, cost of serializing is not an issue,
especially if you cache everything on a ramdisk.

> These issues above as well as things like not being able to centrally
> configure a database connection by using an alias for the name are
> areas PHP lacks in comparision to Cold Fusion. Our CF application gets
> installed at client sites. Using PHP, it would require a code change
> in a db connect file to change the DB connection information where it
> really should be configurable in a central PHP conf file.
>
> Even with this being said, I'd like to use PHP for our application if
> the 2 issues above can be resolved.
>
> Thanks in advance,
> Steve
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Newline charactes causing problems

2002-12-05 Thread John Wards
On Thursday 05 Dec 2002 3:48 pm, Joshua E Minnie wrote:
> A load of stuff..

I just read the fist few paragraphs and got bored;-)

but

Have you tried doing a str_replace for \n which is new line? just replate it 
with a blank string

John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Newline charactes causing problems

2002-12-05 Thread John Wards
On Thursday 05 Dec 2002 3:54 pm, Joshua E Minnie wrote:
> Already tried that.  Doesn't seem to change anything.
>
how about \r 

John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] # of lines in a file

2002-12-09 Thread John Nichel
You could try...

$file = ( "/path/file.ext" );
$lines = sizeof ( $file );

[EMAIL PROTECTED] wrote:

Hey guys, I've been searching the manual for a way to grab the number of 
lines in a file and read a particular line from it, however I found no 
solution to my problem so I'm wondering if any of you out there could help me 
:-)

- CS



--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Dynamic vs. Static

2002-12-09 Thread John Nichel
No.  To get the binary executable, compile it without the apache switch.

[EMAIL PROTECTED] wrote:

 When you compile php for apache using the dynamic module example used in
the documentation, do you not get an exacutable php to use from the
command line?

Ed






--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Dynamic vs. Static

2002-12-09 Thread John Nichel
Yes you can.  Just use clean source, but the config line can be the same 
less the "--with-apache" switch.

[EMAIL PROTECTED] wrote:
 Can I do that using the same src I used to create the dynamic module and
both would work hapilly together?

Thanks,

Ed


On Mon, 9 Dec 2002, John Nichel wrote:



No.  To get the binary executable, compile it without the apache switch.

[EMAIL PROTECTED] wrote:


When you compile php for apache using the dynamic module example used in
the documentation, do you not get an exacutable php to use from the
command line?

Ed






--
By-Tor.com
It's all about the Rush
http://www.by-tor.com










--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Dynamic vs. Static

2002-12-09 Thread John Nichel
I went thru the same problem, so one day I just sat down, and wrote a 
Perl script that does the module and binary at the same time.  Saved me 
alot of grief.

Scott Hurring wrote:
If you do it correctly, yes.

The apache module usually lives somewhere in the apache hierarchy,
whereas the 'php' binary is '/usr/bin/' or '/usr/local/bin/', so they
can quite happily co-exist.

Beware though, when upgrading one, upgrade BOTH.
It drove me nuts once when i forgot, and ended up having a
more recent command line version than apache module
and couldn't figure out why cmdline scripts were acting
differently than when served up thru apache.

--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


Can I do that using the same src I used to create the dynamic module and
both would work hapilly together?

Thanks,

Ed


On Mon, 9 Dec 2002, John Nichel wrote:



No.  To get the binary executable, compile it without the apache switch.

[EMAIL PROTECTED] wrote:


When you compile php for apache using the dynamic module example used in
the documentation, do you not get an exacutable php to use from the
command line?

Ed






--
By-Tor.com
It's all about the Rush
http://www.by-tor.com










--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Dynamic vs. Static

2002-12-09 Thread John Nichel
It probably wouldn't help you all that much.  Since it was for my own 
personal use, I hardcoded directory paths and such for my personal set 
up.  I used to do it with a shell script too (nothing fancy there either).

Just configure it again without apxs

./configure --with-whateveroptions
make

After you compile it (no need to "make install"), the php binary will be 
in your php source directory (named "php")...just move it to where ever 
you want too (I keep mine in /usr/bin).

I'll post my old shell script now, but I don't have access to the Perl 
script until tomorrow morning at work.  I'll send it out then.  They're 
both very static, so you would have to change quite a few items for your 
needs.

--Shell Script--

#!/bin/bash
cd /usr/local/src/tar_files
mv *.tar ../
cd ../
tar -xvf apache_1.3.26.tar
tar -xvf php-4.2.3.tar
tar -xvf mod_perl-1.0-current.tar
mv *.tar tar_files
cd apache_1.3.26
./configure --prefix=/webserver/server
cd ../php-4.2.3
./configure \
--with-apache=../apache_1.3.26 \
--with-mysql \
--disable-pear \
--enable-calendar \
--with-config-file-path=/webserver/server/config \
--enable-ftp \
--enable-sockets \
--enable-wddx \
--with-pspell \
--with-iconv
make
make install
cd ../mod_perl-1.27
perl Makefile.PL APACHE_SRC=../apache_1.3.26/src \
DO_HTTPD=1 \
USE_APACI=1 \
EVERYTHING=1 \
APACI_ARGS='--prefix=/webserver/server \
--bindir=/webserver/server/bin \
--sbindir=/webserver/server/sbin \
--libexecdir=/webserver/server/lib \
--sysconfdir=/webserver/server/config \
--iconsdir=/webserver/docs/vhosts/backup/images/apache_icons \
--htdocsdir=/webserver/docs/vhosts/backup \
--manualdir=/webserver/docs/vhosts/backup/rtfm/apache \
--cgidir=/webserver/docs/vhosts/backup/cgi-bin \
--includedir=/webserver/server/include \
--logfiledir=/webserver/server/logs \
--proxycachedir=/webserver/server/proxy \
--server-uid=apache \
--server-gid=www \
--activate-module=src/modules/php4/libphp4.a'
make
make install
cd ../apache_1.3.26
make install
rm -rf apache_1.3.26
rm -rf php-4.2.3
chown -R apache /webserver/server
chgrp -R www /webserver/server
chown -R apache /webserver/docs
chgrp -R www /webserver/docs
chmod -R g+w /webserver/docs
chmod -R g+w /webserver/server/config
cd /usr/local/src/tar_files
mv php-4.2.3.tar ../
cd ../
tar -xvf php-4.2.3.tar
mv php-4.2.3.tar tar_files
cd php-4.2.3
./configure \
--with-mysql \
--disable-pear \
--enable-calendar \
--with-config-file-path=/webserver/server/config \
--enable-ftp \
--enable-sockets \
--enable-wddx \
--with-pspell \
--with-iconv
make
make install

--Shell Script--

Tariq Murtaza wrote:
Hi John,

Can we share your Perl script?
I compiled with switch "--with-apxs=/usr/local/apache/bin/apxs"
Is it that apache switch?

Thanks

Tariq


John Nichel wrote:


I went thru the same problem, so one day I just sat down, and wrote a 
Perl script that does the module and binary at the same time.  Saved 
me alot of grief.

Scott Hurring wrote:

If you do it correctly, yes.

The apache module usually lives somewhere in the apache hierarchy,
whereas the 'php' binary is '/usr/bin/' or '/usr/local/bin/', so they
can quite happily co-exist.

Beware though, when upgrading one, upgrade BOTH.
It drove me nuts once when i forgot, and ended up having a
more recent command line version than apache module
and couldn't figure out why cmdline scripts were acting
differently than when served up thru apache.

--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


Can I do that using the same src I used to create the dynamic module 
and
both would work hapilly together?

Thanks,

Ed


On Mon, 9 Dec 2002, John Nichel wrote:


No.  To get the binary executable, compile it without the apache 
switch.

[EMAIL PROTECTED] wrote:

When you compile php for apache using the dynamic module example 
used in
the documentation, do you not get an exacutable php to use from the
command line?

Ed








--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Out with the new, In with the old

2002-12-12 Thread John Nichel
You can prepend a file to your site by using a .htaccess file.

Scott Houseman wrote:

Hi

Try and get them (your hosting company)to configure your site with a 
prepend file e.g. prepend.php for your domain.
in this file, do something like:


//
// DECLARE ARRAYS
//
$_GET = array( );
$_POST = array( );
$_SERVER = array( );
// etc..
while ( list( $sKey, $mVal ) = each( $HTTP_GET_VARS ) )
{
$_GET{$sKey} = $mVal;
}
// Do this for all arrays which you want to use in your code.
?>

As this file will be auto prepended everytime php is invokded,
these variables will always be available, although they will NOT
be global. That might be a problem if you are using them in the global
scope.

Hope this is useful.

Cheers


Scott

On 2002/12/12 08:14, Jonathan wrote:

I began to develop a small session based shopping cart using newer 
syntax.
For example, $_SERVER, $_REQUEST, $_SESSION, etc.  Anyway, I'm almost 
done
with the cart and just found out that the hosting company for the 
client is
running PHP 4.0.6.  Is there anyway around this besides changing all 
of my
variable names?



===
Jonathan Villa
Application Developer
IS Design & Development
www.isdesigndev.com  414.429.0327
===








--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Nigerian oil scams

2002-12-12 Thread John Meyer
php

How did a Nigerian oil scam e-mail get on this list, anyway?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] how to send an MSWORD email?

2002-12-13 Thread John Wards

>
>
> 3.some other better methods.

Have a look on pear.php.net for the mime mail class. It has things for 
attaching images and including them in an html email

Cheers
John Wards
SportNetwork.net

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




  1   2   3   4   5   6   7   8   9   10   >