RE: [PHP] Please Help!!!! - Really BASIC stuff!

2001-03-06 Thread Jon Snell

Be very careful with this construct.  It is generally a bad idea to do any
sort of file opening/loading where the file name comes directly from user
input.

If you were naive enough to use this line:

include("$page.txt");

I could call your php script with ?page=http://mysite.com/dumpyourdatabase

PHP would then load and execute something like this:

http://mysite.com/dumpyourdatabase.txt

An entry could be added to the MySQL.User table from the code in this script
allowing remote access or many other things.

If you decide you really want something like this, it would be a great idea
to run a regular expression on $page and erase any non-letter characters.

Also, as a general reminder, make sure your database permissions are set up
properly for the MySQL user your database is running under (generally they
should not have access to the MySQL table, and only be allowed to
insert/select/update to the database the website works with).

Jon Snell

-Original Message-
From: Nick Norton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 06, 2001 3:57 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Please Help - Really BASIC stuff!


Just put the following instead of a long switch and keep your file naming
conventions consistent

include("side_$page.txt");


--
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] exec as another user

2001-03-07 Thread Jon Snell

It would be a much better idea to set the +s flag on the executable you are
trying to run, and make sure it's owned by the other user.

-Original Message-
From: Henrik Hansen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 1:10 PM
To: php general
Subject: Re: [PHP] exec as another user


> Hi,
>
> This may be a stupid question but how can I execute programs as another
> user under php?
> I'm using Linux with Apache 1.3.12 and PHP 4.

The only way i can figure out would be by using the sudo command without a
password
(don't do that with root), do a 'man sudo' on your linux box

--
Henrik Hansen


--
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] Cache Database-driven site

2001-03-12 Thread Jon Snell

There are already some caching packages out there, I'm not sure how they
perform with CGI (look into Squid).  Having each page check for a cached
version of itself sounds like a complicated approach.  Another idea is to
generate portions of your site as that don't change often from perl scripts,
and run these from cron.  Using server-side-includes can make this a much
easier process.

-Original Message-
From: Joachim Maier [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 4:20 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Cache Database-driven site


Hi all,

i'm appreciating any comments on this idea:

I'm about to create a completely database driven site (mySQL).
Almost all of the output is generated from database data.

A big part of the data is rather static of nature, eg. updated once a month.
A smaller part is quite dynamic, e.g. content is added daily.

Now the problem:
My webhoster's database server (not the webserver!) is nearly breaking down
in high-traffic-times.
While static sites are performing fine, my site is almost down :-((

Here my idea:
I thought of creating a cache-mechanism where each php-page checks for the
existence of a static html-cache-page that holds its contents. When the page
is there it is read and echoed out to the browser. If it isn't there, it
shall be created automatically.

To create the HTML-cache page i need to build the whole HTML-page content in
memory, instead of echoing it back to the user's browser, and finally write
it to disk. That means, i have to write all HTML in php-code. I can't just
embed php-parts in html tags.

I'm not sure, whether this is the right way to go, as i can see some major
drawbacks of this approach, although my general php-architecture is template
oriented, which would make the approach practical.

I would really appreciate some comments on this.

Thanks in advance,
Joe



--
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] update two frames at once?

2001-03-12 Thread Jon Snell

Doing multiple frames and forms with JavaScript is not really a good idea.
Debugging the code for this can become a nightmare...

-Original Message-
From: Rene Maldonado [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 6:59 PM
To: Michael George
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] update two frames at once?


Hi

I had the same problem, and I did not find an answer this way, the only way
is
with javascript .

Rene

Michael George wrote:

> Hello al!
>
> Is it possible to have two frames updated when cliking on one link?  I
have a
> page that is broken into 4 parts:
> master title
> section title
> d   section screen
> i
> r
> .
>
> what I want is that when a link is clicked on in the directory (the left
> column), I'd like to update the section title *and* the section screen...
>
> It seemed a cool layout at the time, but I'm thinking this isn't easily
> possible and I might just have to incorporate a section title on the
section
> screen...  But before I rewrite it, I thought I'd ask here.
>
> Thanks!
>
> -Michael
>
> P.S. I'd like to commend the regular posters to this list on being SOOO
>  informative and patient!  Every small question to this list always
>  gets several useful answers, even when I've seen questions asked over
>  and again.
>
> --
> No, my friend, the way to have good and safe government, is not to trust
it
> all to one, but to divide it among the many, distributing to every one
exactly
> the functions he is competent to.  It is by dividing and subdividing these
> republics from the national one down through all its subordinations, until
it
> ends in the administration of every man's farm by himself; by placing
under
> every one what his own eye may superintend, that all will be done for the
> best.
> -- Thomas Jefferson, to Joseph Cabell, 1816
>
> --
> 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] Grab and print user IP address

2001-03-12 Thread Jon Snell

These are normally already stored as variables in PHP for you.
Run the phpinfo(); function and it will display a list of the current
variables and values...

-Original Message-
From: Dream [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 4:00 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Grab and print user IP address


Hi!

I need just a little script so I can get and print in browser the currently
users IP address and if possible, browser type, etc.

Thanks a lot!

marc




--
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] Password Generator?

2001-04-19 Thread Jon Snell

There is code in the source for NetHack to create pronounceable words.
Also, combining words would probably be somewhat easy.  A lazy coder could
import a unix dictionary file into a MySQL table and do "select word from
word order by rand limit 2" and just combine the results.

-Original Message-
From: Plutarck [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 4:52 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Password Generator?


I believe there is an article on phpbuilder.com on "pronouncable passwords",
which is probably what you'll want to actually do. Using real words would
just be way too resource intensive.

I'd give you the direct link to the article, but it seems my internet
connection only works for NNTP and ftp downloads...my HTTP has broken for
the moment, and I have no idea why ;(


--
Plutarck
Should be working on something...
...but forgot what it was.


""Ashley M. Kirchner"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Is there an easy way to generate generic passwords based on
> (combined) dictionary words?  (ej: take two different words and put them
> together)
>
> AMK4
>
> --
> W |
>   |  I haven't lost my mind; it's backed up on tape somewhere.
>   |
>   ~
>   Ashley M. Kirchner    .   303.442.6410 x130
>   SysAdmin / Websmith   . 800.441.3873 x130
>   Photo Craft Laboratories, Inc. .eFax 248.671.0909
>   http://www.pcraft.com  . 3550 Arapahoe Ave #6
>   .. .  .  . .   Boulder, CO 80303, USA
>
>
>
> --
> 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] mySQL problem

2001-11-02 Thread Jon Snell

The issue here is that you aren't getting an index of "Company" from that
query.  It is probably stored under the index of "UCASE(Company)".  Try:

$Query = "SELECT UCASE(Company) as ucCompany, Icons, ID,...";

Then the ucCompany field will contain your capitalized company data.

Jon

-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 2:22 AM
To: Php-General
Subject: [PHP] mySQL problem


I'm having a wierd problem with mySQL query.

$Query = "SELECT UCASE(Company), Icons, ID, LogoD FROM feComps";

returns right amount of rows, but field Company is empty.

$Query = "SELECT Company, Icons, ID, LogoD FROM feComps.";

works fine.


First query works great when I run it in shell. What could cause this?


Niklas


-- 
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: SV: [PHP] Booking by Date/Time in mySQL

2001-03-21 Thread Jon Snell

Yes, I would recommend locking your tables before doing this just in case.
Another solution would be to create a unique-key based on the bed field and
date field.  This way you are guaranteed never to double book, and can just
check for errors after insert rather than do an additional select statement
and worry about race conditions...



-Original Message-
From: Jeff Armstrong [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 12:36 PM
To: Thomas Edison Jr.
Cc: [EMAIL PROTECTED]
Subject: RE: SV: [PHP] Booking by Date/Time in mySQL


the logic goes:

$start = some_start_date_a_keen_punter_entered();
$end = the_date_he_wants_to_leave();

select * from booking where
('$start'>=startdate and '$start'<=enddate) or
('$end'>=startdate and '$end'<=enddate)

if (uh_ohh_I_got_a_row_back())
  echo "Someone else is sleeping in the bed! No can do!",
   "Cheap discounts for those willing to share a bed!",
   "Are you gorgeous??";
else
  print "You got it!"
  insert good bits into database here


Of course this is not guaranteed safe, as you can end up
with double bookings in the pico seconds between the select
and the insert - but hey, how many hits a second do you expect.


Regards
Jeff's Granny


-Original Message-
From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 5:08 PM
To: Jeff Armstrong
Cc: [EMAIL PROTECTED]
Subject: RE: SV: [PHP] Booking by Date/Time in mySQL


I do get your message Jeff, but tell me, after having
used the following code ..

select * from booking where
('$start'>=startdate and '$start'<=enddate) or
('$end'>=startdate and '$end'<=enddate)

what code should be written to actually insert booking
data into the table? Because this is basically picking
up data or booking from the Table that fall in this
period. What i want to do is to check if any booking
has been made for this period that i'm inserting
now

T. Edison jr.

--- Jeff Armstrong <[EMAIL PROTECTED]> wrote:
> One problem is that you are only checking the first
> booking.
>   select * from booking where room='room'
> gives ALL bookings, and you look like you are just
> testing
> the FIRST one.
>
> why not turn it round and do:
>   select * from booking where
> ('$start'>=startdate and '$start'<=enddate) or
> ('$end'>=startdate and '$end'<=enddate)
>
> This lets mySQL do the test for you.
> If it returns a row you already have a booking.
>
>
> -Original Message-
> From: Thomas Edison Jr.
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 20, 2001 11:50 AM
> To: Peter Chr. Hansen
> Cc: [EMAIL PROTECTED]
> Subject: Re: SV: [PHP] Booking by Date/Time in mySQL
>
>
> Peter,
>
> what do you mean by Newdate between date1 & date2??
> the logic i'm using is that i'm checkin if the new
> Start Date & End date lies between the old Start
> Date
> & End Date or not. If it does, than entry is denied,
> else booking is succesfull. But things are not
> running, following is the code i'm using ...
> --
>  $db = mysql_connect("localhost","root");
> mysql_select_db("nidc_intranet",$db);
>
> $realsdate="$syear"."-"."$smonth"."-"."$stdate";
> $realedate="$eyear"."-"."$emonth"."-"."$endate";
> $realstime="$shh".":"."$smm"." "."$sttime";
> $realetime="$ehh".":"."$emm"." "."$entime";
>
> $result = mysql_query("SELECT * FROM booking where
> room='$rooms',$db);
> if ($myrow = mysql_fetch_array($result)) {
>   do {
> if ($realsdate>=$myrow[sdate]) &&
> ($realsdate<=$myrow[edate]) &&
> ($realedate>=$myrow[sdate]) &&
> ($realedate<=$myrow[edate]) {
> echo "Sorry";
> }
> else {
>
> $sql = "INSERT INTO booking
> (room,sdate,edate,stime,etime,purpose,reserved)
> VALUES
>
('$rooms','$realsdate','$realedate','$realstime','$realetime','$purpose','$r
> es')";
> $result = mysql_query($sql) or Die ("An
> unexpected
> error occured. Please go back and book again.");
> echo " color=#140057>Thank you!  color=#ff>$rooms, has been booked from
> $realsdate to  color=#ff>$realedate.
> 
> ** Entries will be deleted 2 weeks after the End
> Date.
> ";
> }
>   } while ($myrow = mysql_fetch_array($result));
> }
>  ?>
> 
>
> Regards,
> T. Edison jr.
>
> --- "Peter Chr. Hansen" <[EMAIL PROTECTED]> wrote:
> > Can't you use "
> > Newdate between date1 and date2
> >
> >
> > -Oprindelig meddelelse-
> > Fra: Thomas Edison Jr.
> > [mailto:[EMAIL PROTECTED]]
> > Sendt: 20. marts 2001 12:25
> > Til: [EMAIL PROTECTED]
> > Emne: [PHP] Booking by Date/Time in mySQL
> >
> >
> > I'm facing this problem.
> > I have made a room booking application.
> > There is a Start Date & Time and End Date & Time
> of
> > Booking a room.
> >
> > Problem is that once booked, you can't book a room
> > with a date or time that falls between an Already
> > booked  Date & Time.
> >
> > For example, if someone's booked a room from 3rd
> > March
> > to 10th March between 4:00 p.m. to 12:00 p.m. ,
> you
> > can't book the same room for t

RE: [PHP] deletion of temp files

2001-07-10 Thread Jon Snell

One way to do this is to create a special directory in htdocs reserved only
for temporary files.  Add the following line to crontab or a user with
permissions to delete:

0 * * * * find /usr/local/apache/sitename/htdocs/specialdir/ -cmin
+1440 -exec -rm -f {}

Every hour this script will delete all files in specialdir over 24 hours
old.  Just make sure you use the right directory name :)

I like this approach best because it doesn't add a bunch of overhead to any
of the session scripts.

-Original Message-
From: Anurag Bhalla [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 2:11 AM
To: [EMAIL PROTECTED]
Subject: [PHP] deletion of temp files



Hi list

In my application,I need to generate some files for each
user who comes to my site.These files need to be deleted
once the user logs off. Pls suggest some way to delete these
files once the user logs off ; perhaps with the use of sessions

Regards

Anurag





-- 
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] installing php as cgi on linux

2001-07-27 Thread Jon Snell

This is a long shot, but...  MSIE has a nasty habit of saving the mime type
of a page.  If you attempted to load the URL before PHP was set up properly,
it won't load until after you closed IE and reopened.


-Original Message-
From: Richard Kurth [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 2:20 PM
To: php
Subject: [PHP] installing php as cgi on linux


I am trying to get php as cgi installed on a RedHat7 box to be used
with Apache. I configured it with ./configure --with-mysql  did a make
and then a make install every thing whet just fine. I add
ScriptAlias /php/ "/usr/local/bin/php"
AddType application/x-httpd-php .php4 .php3 .phtml .php
AddType application/x-httpd-php-source .phps

to the httpd.conf file. and restarted Apache.

When I try to run a test file with a .php ext All it does is try to
download it. This should be simple but I can not figure it out.
What else should I look at?




















Best regards,
 Richard
mailto:[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] Importing MS Access into MySQL?

2001-01-29 Thread Jon Snell

There are a few ways to do this...

1) Save your data to a comma separated list and use the import features of
mysql.  This is the easiest option for one time use.
2) Use MyODBC, create a link table, and paste the rows into it.  This is one
of the easier options if you plan on doing it repeatedly.

Jon Snell

-Original Message-
From: James, Yz [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 29, 2001 3:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Importing MS Access into MySQL?


Hey all,

I heard somewhere (I think) that it's possible to import a Microsoft Access
file (when saved as a delimited text file) into a MySQL table  Just
wondering whether or not this is true, and if it is, where I might find a
tutorial / some literature on how I might go about doing it.

Thanks, as always, in advance :)

James.



--
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] sessions - max number of variables before things get bad?

2001-01-31 Thread Jon Snell

The number of variables you are using probably won't make much of an impact
on performance.  You may want to test doing it both ways, you can use the
gettimeofday function to do function profiling, it will return the time with
microsecond accuracy.  I'm guessing one call to the database at the start of
script execution would be much faster assuming all the variables are in the
same row.  A lot of the time spent executing the query is spent on doing a
disk seek, which will be greatly reduced if everything is placed in one
call.


Jon Snell

-Original Message-
From: Andrew Elliston [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 1:12 PM
To: [EMAIL PROTECTED]
Subject: [PHP] sessions - max number of variables before things get bad?


I'm exploring sessions in PHP4 as I build a new site, and I have decided to
rely on them more heavily than in the past.

Basically, I'd like to set things up so that when someone logs into the
site, all of their accounts variables are queried from a database and loaded
into session variables (we're talking about 50 variables, most just 1-3
words). Does this sound reasonable for a relatively high traffic site? If I
don't do this, then many of those variables will probably be queried from a
database more than once during a visit, which seems unnecessary when I can
use session variables.

Are there any guidelines on the performance penalty for using large numbers
of session variables? Or is the affect so minute that I really shouldn't
worry about it? (especially compared to querying a database)

Thanks,
Andrew
--
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] gethostbyaddr timeout

2001-01-31 Thread Jon Snell

Your best bet would be to do this in another language such as perl or c
where you can build a multithreaded application to look these up.  Along the
same note you can also split the file into a number of parts and run
multiple instances of the same script.  Afaik, the only way to decrease the
timeout on a host lookup is to write your own nameserver query code.  If all
of this is outside of the scope of your programming knowledge, I would
suggest biting the bullet and waiting for your script to complete.  Then
make a system to process new entries into the system when they are received.
Also...why do you need to do this?  It seems very odd.

Jon Snell

-Original Message-
From: Aaron Gould [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 11:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] gethostbyaddr timeout


I'm at the end of my rope here...

I have a 100,000+ line file containing IP addresses.  For each line, I need
to run a "gethostbyaddr" command.  However, some lines take a long time to
timeout.  Is there a way I can decrease this timeout period to one or two
seconds?

Thanks!!

--
Aaron Gould
Programmer/Web Developer
Parts Canada - http://www.partscanada.com




--
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] Passing variables to a scripting engine... (like php)

2001-02-15 Thread Jon Snell

It is sent as text to stdin.

-Original Message-
From: Diego Fulgueira [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 15, 2001 4:45 PM
To: Php-General
Subject: [PHP] Passing variables to a scripting engine... (like php)


Ok. I already posted a question asking how to pass parameters to php.exe
when running it directly from the command prompt. However, i've noticed the
matter is a bit more complex than i had thought. I will reformulate my
question:

How the h--- does any Web Server passes information like the URL being
processed, posted variables, etc, etc, to a scripting engine???

I've noticed it is not through command line arguments... Could it be using
enviroment variables...?

The initial purpose of this was to schedule a script to be executed on a
periodic basis... but know I am very curious!!
Still, i will greatly appreciate workarounds.

THANKS A LOT AGAIN.

Cheers, Diego.


-- 
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] run safe_mysqld from php code *urgent*

2001-02-15 Thread Jon Snell

This is an issue with user permissions.  You *could* create a world
executable suid script that did executed the command.  PHP would then call
that.  This is dangerous though, and I'd avoid it.

-Original Message-
From: Student Center [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 15, 2001 3:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] run safe_mysqld from php code *urgent*


hey guys,
in order to restart my mysql server i'd like to run safe_mysqld from my
php file. i have this:

`./usr/local/mysql/bin/safe_mysqld`

however when we check the list of processes, safe_mysqld isnt there. what am
i doing wrong? btw, we've tried taking out the period (.) and running exec()
instead

- noah



--
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] swflib

2001-02-17 Thread Jon Snell

Attempting to use this in PHP causes Apache to segfault.  Is there anywhere
I can download the source and make sure it's linked against my libs
properly?




-- 
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]