php-general Digest 9 Apr 2005 13:27:48 -0000 Issue 3387
Topics (messages 212688 through 212717):
Re: Regular Expressions?
212688 by: dan
212690 by: John Nichel
212692 by: Richard Lynch
Re: Storing password in cookie
212689 by: Richard Lynch
212691 by: John Nichel
212703 by: Andy Pieters
212707 by: trlists.clayst.com
212709 by: Jason Wong
212710 by: Computer Programmer
212715 by: John Nichel
Re: Iv size incorrect
212693 by: Tom Rogers
Re: Simple Licensing System
212694 by: Richard Lynch
Re: Compress Files
212695 by: Richard Lynch
Re: using rand()
212696 by: Richard Lynch
Re: threaded comments
212697 by: Richard Lynch
212698 by: Richard Lynch
212699 by: Richard Lynch
212702 by: Sebastian
Re: sessions not being stored : DAY 2
212700 by: Yuri Huitr�n Alvarado
212706 by: Burhan Khalid
[suspicious - maybe spam] Re: [PHP] How do I get the first element's key of an
array of objects?
212701 by: Mattias Thorslund
Need libmcrypt.dll for Windows PHP 4.3.9
212704 by: HarryG
212708 by: Computer Programmer
212712 by: HarryG
Re: Why is it possible to assign data to _not_declared_ vars in a class (PHP
5.0.3)?
212705 by: hanez
Problem with ob_get_contents()
212711 by: Prathaban Mookiah
[PHP-INSTALL] Install Problems on Fedora 3
212713 by: Mark Sargent
212714 by: Jason Wong
212716 by: John Nichel
212717 by: Mark Sargent
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
[EMAIL PROTECTED] wrote:
Windows 2000 Server
IIS 5/Apache 1.3.33
MySQL 4.1.1
Smarty 2.6.9
PHP 5.0.3
Hi all,
I am looking for help handling a form input to SQL. I believe the solution has to do with regular expressions.
My big problem is that when a user submits data such as:
Joe's Crabshack
The ' apostrophe or " can cause an early truncation of the data. My code thinks
that the closing identifier is after the word Joe and the rest of the input is lost.
Further, if the data does get by and it could possibly break a SQL statement.
Am I right in thinking the solution in this matter is using regular expressions? If so, where is a good resource to polish my skills?
What about turning off/on magic quotes?
John
If you don't plan on doing anything this weekend, pick yourself up a
copy of O'Reilly's Regular Expressions. It's "The Owl Book", by the cover.
The reason why I ask if you have all weekend is because it's a good
book, but at 300+ pages, it's a good read. I still don't know my
regex's very well, but then again, I just kinda skipped through it.
However, it is laid out in a format that makes it a very good reference
book, so if you're looking to do something, then this book makes it easy
to "piece things together" and find a regex that works quite well.
Thanks
-dant
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
<snip>
Joe's Crabshack
The ' apostrophe or " can cause an early truncation of the data. My code thinks
that the closing identifier is after the word Joe and the rest of the input is lost.
Further, if the data does get by and it could possibly break a SQL statement.
Am I right in thinking the solution in this matter is using regular expressions? If so, where is a good resource to polish my skills?
What about turning off/on magic quotes?
John
No need for a regex. Use something like mysql_escape_string() or
addslashes(). That's what these functions are made for.
The Camel book is a good place to start your regex learning.
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--- End Message ---
--- Begin Message ---
On Fri, April 8, 2005 3:43 pm, [EMAIL PROTECTED] said:
> I am looking for help handling a form input to SQL. I believe the solution
> has to do with regular expressions.
> My big problem is that when a user submits data such as:
>
> Joe's Crabshack
>
> The ' apostrophe or " can cause an early truncation of the data. My code
> thinks that the closing identifier is after the word Joe and the rest of
> the input is lost. Further, if the data does get by and it could possibly
> break a SQL statement.
>
> Am I right in thinking the solution in this matter is using regular
> expressions? If so, where is a good resource to polish my skills?
You would be far better off using the built-in mysql_escape_string (recent
PHP versions) or http://php.net/addslashes
You might want to try to use Regex as an exercise, but this ain't the
place for it on a real site.
--
Like Music?
http://l-i-e.com/artists.htm
--- End Message ---
--- Begin Message ---
On Fri, April 8, 2005 5:18 pm, Computer Programmer said:
> What is a better way to store password in a cookie?
>
> md5()?
> base64_encode()?
> mhash()?
> mcrypt_generic()?
> crypt()?
D) None of the above.
You only think you need to store a password in a Cookie.
You don't.
Use sample code from http://php.net/session_start instead
--
Like Music?
http://l-i-e.com/artists.htm
--- End Message ---
--- Begin Message ---
Computer Programmer wrote:
What is a better way to store password in a cookie?
There is no good way to store a password in a cookie. Just don't do it.
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--- End Message ---
--- Begin Message ---
On Saturday 09 April 2005 02:18, Computer Programmer wrote:
> What is a better way to store password in a cookie?
>
> md5()?
> base64_encode()?
> mhash()?
> mcrypt_generic()?
> crypt()?
It doesn't matter how you encrypt it.
DO NOT STORE PASSWORDS ON USERS COMPUTER
I hope that's clear enough.
What you can do, and in fact I do for production sites is when the user logs
on, you create an unique identifier and make a hash from it using your
favorite encryption method. (sha1, md5, crc32). I like sha1.
Save that hash in a temporary table and link it to the user's ID. Set an
exipry date and extend that on each subsequencial request.
Additionally you can save the IP number there as well. But that can lead to
issues if they are connected trough a firewall, router, or proxy.
Think of it as assigning a temporary password, only it is transparent to the
user.
Structure
Login
Password Validated
Create unique id
save in connections table
set cookie with unique id and userid
Page Request
Check for cookie
lookup unique id in connections table
id expired? No -> User still loged in
No Cookie
Do Login
This way, you automatically log out users that are logging in on another
computer.
Kind regards
Andy
--
Registered Linux User Number 379093
--
Feel free to check out these few
php utilities that I released under the GPL2 and
that are meant for use with a php cli binary:
http://www.vlaamse-kern.com/sas/
--
--- End Message ---
--- Begin Message ---
On 9 Apr 2005 Andy Pieters wrote:
> It doesn't matter how you encrypt it.
>
> DO NOT STORE PASSWORDS ON USERS COMPUTER
>
> I hope that's clear enough.
A couple of people have stated this but I think it is incorrect. For
one thing the users themselves are very likely to store the password
there, so why shouldn't you -- with permission of course?
Many sites will do this with a "remember my password and log me in
automatically" feature. Web-based discussion boards, for example, do
this routinely and the only security risk is that someone who got
access to your computer might get access to your account on the board.
As long as the discussion topics are not sensitive I suspect most
people using private computers would judge this to be an acceptable
risk. On the other hand I would never do it (or allow a site to do it)
for a site where my email account could be accessed, or money could be
charged. But others might feel their computer is secure enough that
they are willing to take even those risks.
Like many such questions, to me this is not something that should be
subject to absolutes but to considered judgment, some on the part of
the developer and some on the part of the user.
--
Tom
--- End Message ---
--- Begin Message ---
On Saturday 09 April 2005 19:29, [EMAIL PROTECTED] wrote:
> On 9 Apr 2005 Andy Pieters wrote:
> > It doesn't matter how you encrypt it.
> >
> > DO NOT STORE PASSWORDS ON USERS COMPUTER
> >
> > I hope that's clear enough.
>
> A couple of people have stated this but I think it is incorrect. For
> one thing the users themselves are very likely to store the password
> there, so why shouldn't you -- with permission of course?
Because you should know better than the user!
> Many sites will do this with a "remember my password and log me in
> automatically" feature.
It doesn't necessarily mean that it will literally store your password in
a cookie, it could just be storing a token. With a token, your website
could impose expiry dates on them or invalidate them (and possibly issue
a new one) whenever the user performs a full password login etc. Thus if
a bad person gets hold of your token it'll probably mean that they'll
only have access to that account for a limited period of time (depending
on what security measures your website employs). However if you had
stored the actual password and some bad person got hold of it then there
is no reasonable way for your website to distinguish the bad person using
the password to gain access from the legitimate user.
--
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
------------------------------------------
New Year Resolution: Ignore top posted posts
--- End Message ---
--- Begin Message ---
Thanks for all of your reply. :)
Just like what trlists said, I'd like to create an auto-login at least
with a maximum of 30 days. Users will have the option to choose
whether to logout and/or prompt for their password for the next 1
hour, 4 hours, etc. just like what Yahoo! is doing.
What is the difference between what Richard Lynch has suggested (using
sessions) and the one suggested by Andy (using table links)?
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
<snip>
A couple of people have stated this but I think it is incorrect. For
one thing the users themselves are very likely to store the password
there, so why shouldn't you -- with permission of course?
If the user wants to circumvent security measures by storing passwords,
that's their option, but it's the programmer's obligation to keep
his/her app as secure as possible.
Many sites will do this with a "remember my password and log me in
automatically" feature. Web-based discussion boards, for example, do
this routinely and the only security risk is that someone who got
access to your computer might get access to your account on the board.
As long as the discussion topics are not sensitive I suspect most
people using private computers would judge this to be an acceptable
risk. On the other hand I would never do it (or allow a site to do it)
for a site where my email account could be accessed, or money could be
charged. But others might feel their computer is secure enough that
they are willing to take even those risks.
While 'remember me' is a popular option, it doesn't mean that the site
is storing your password in a cookie. In applications I create, the
password never 'leaves the database'. When the user submits their
login, I'll check the password against what is in the db (after doing
various encrypt methods on it), and that's as far as it goes. If the
login is successful, and the user has a 'remember me' option, I'll
create a unique hash based on a combination of things (like username,
ip, time, random words, etc.), and store that hash in in a temporay
table (as well as in the cookie). When the user comes back, I'll check
that hash, and if successful I'll delete it, and generate a new one for
next visit. And even this type of 'login' may not give the user full
access to their account, as I may ask for the password again if they
want to update some items.
Like many such questions, to me this is not something that should be
subject to absolutes but to considered judgment, some on the part of
the developer and some on the part of the user.
While it is not absolute that you can't store passwords in a cookie, it
is an absolute that you _shouldn't_
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--- End Message ---
--- Begin Message ---
Hi,
Saturday, April 9, 2005, 3:35:21 AM, you wrote:
MH> I have an odd php issue with mcrypt.
MH> I'm getting a lot of this type of error, but only sometimes:
MH> mcrypt_generic_init(): Iv size incorrect; supplied length: 0, needed: 32
MH> (note, the "supplied length: 0" is not always the same. sometimes it is
MH> 1, 16, etc).
MH> It doesn't seem to affect the decoding of the file, but it is throwing a
MH> notice in to my error log. I've tried doing this:
MH> @mcrypt_generic_init($this->td, $key, $iv)
MH> but that doesn't stop it from throwing an error.
MH> The only thing I can think is that I have
MH> mcrypt_module_close($this->td)
MH> commented out because my code was dying with it...
MH> System:
MH> Linux w/ Apache 1.3.31
MH> PHP Version 4.3.4
MH> libmcrypt version 2.5.7
MH> Suggestions?
I do this to set a zero iv
$td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, "");
$key = substr($secret, 0, mcrypt_enc_get_key_size ($td));
$iv = pack("a".mcrypt_enc_get_iv_size($td),$iv);
mcrypt_generic_init ($td, $key, $iv);
--
regards,
Tom
--- End Message ---
--- Begin Message ---
On Fri, April 8, 2005 1:06 pm, Bruno B B Magalh�es said:
> I need a help with a licensing system, I want something very simple,
> for example a simple var store into the configuration file, and witch
> is sent to a server called licenses.hostname.com.br, and this one
> returns true or false... I don't wanna use SOAP or XML. Does any body
> have a simple idea for it?
>
> Best Regards,
> Bruno B B Magalhaes
Generate an SSH key-pair.
Give them the public key, or use that to "sign" their license.
Then you can just test that it's signed.
--
Like Music?
http://l-i-e.com/artists.htm
--- End Message ---
--- Begin Message ---
On Fri, April 8, 2005 3:54 pm, IMEX Research said:
> How do I compress two or more files using PHP? All I have been able to
> find information on is compressing strings, or just one file.
You could use http://php.net/exec with tar and gzip, but you'd have to be
sure only ONE script was doing this at a time for any given file[s]
--
Like Music?
http://l-i-e.com/artists.htm
--- End Message ---
--- Begin Message ---
On Fri, April 8, 2005 7:41 am, kyriacos sakkas said:
> first I would suggest you get the largest value from the auto increment
> field (maybe use last_insert_id()). Then use rand(1,$cno_max) three
> times to get three random cno numbers, then "select ... from ... where
> cno=$val1 or cno=$val2 or cno=$val3" should return the three values.
> rand() can also be directly in the sql statement.
> Also manual suggests using mt_rand instead of rand for better performance.
Reasons NOT to do this:
If you ever delete a record, then $val2 might not *BE* there.
To get the max(id) requires an extra query.
MySQL does *NOT* promise the numbers will be 1, 2, 3, 4, ...
Sure, they happen to be that *NOW* and it's unlikely to change, but it's
*NOT* a documented feature.
What if $val1 and $val2 both happen to come out as "42" one day? Then
you're not going to get 3 different records. ORDER BY rand() will always
return 3 different records.
It's unlikely that PHP's mt_rand() will be enough faster to justify using
it when a single SQL statement is so much more clear than 5 lines of PHP.
--
Like Music?
http://l-i-e.com/artists.htm
--- End Message ---
--- Begin Message ---
On Thu, April 7, 2005 1:17 pm, Sebastian said:
> i am developing a comment/discussion board and i want to display the
> results
> in a threaded style. so far i have it all working except this one issue:
>
> each row has an ID and a parentid, say i have 5 rows:
>
> id : 10 most oranges come from florida
> id : 16 ---- Re: most oranges come from florida (parentid 10)
> id : 22 --------- Re: most oranges come from florida (parentid 16)
> id : 24 --------- Re: most oranges come from florida (parentid 22)
> id : 28 ---- Re: most oranges come from florida (parentid 16)
>
> i want the rows to know the id directly above itself
> so for example, row 5 (id 28) will some how know its parentid (16) is not
> directly above it and is not accociated with the result its above (24)
>
> i want to 'highlight' a row when the parent it belongs to is directly
> above
> and do nothing if its not.
$query = "select ID, parentid from ...";
$lines = mysql_query($query);
$last_id = '';
while (list($ID, $parentid) = mysql_fetch_row($lines)){
$class = $last_id == $parentid ? 'highlight' : 'normal';
echo "<span class='$class'>$ID</span><br />\n";
$last_id = $ID;
}
--
Like Music?
http://l-i-e.com/artists.htm
--- End Message ---
--- Begin Message ---
On Thu, April 7, 2005 1:17 pm, Sebastian said:
> i am developing a comment/discussion board and i want to display the
> results
> in a threaded style. so far i have it all working except this one issue:
>
> each row has an ID and a parentid, say i have 5 rows:
>
> id : 10 most oranges come from florida
> id : 16 ---- Re: most oranges come from florida (parentid 10)
> id : 22 --------- Re: most oranges come from florida (parentid 16)
> id : 24 --------- Re: most oranges come from florida (parentid 22)
> id : 28 ---- Re: most oranges come from florida (parentid 16)
>
> i want the rows to know the id directly above itself
> so for example, row 5 (id 28) will some how know its parentid (16) is not
> directly above it and is not accociated with the result its above (24)
>
> i want to 'highlight' a row when the parent it belongs to is directly
> above
> and do nothing if its not.
$query = "select ID, parentid from ...";
$lines = mysql_query($query);
$last_id = '';
while (list($ID, $parentid) = mysql_fetch_row($lines)){
$class = $last_id == $parentid ? 'highlight' : 'normal';
echo "<span class='$class'>$ID</span><br />\n";
$last_id = $ID;
}
--
Like Music?
http://l-i-e.com/artists.htm
--- End Message ---
--- Begin Message ---
On Thu, April 7, 2005 1:17 pm, Sebastian said:
> i am developing a comment/discussion board and i want to display the
> results
> in a threaded style. so far i have it all working except this one issue:
>
> each row has an ID and a parentid, say i have 5 rows:
>
> id : 10 most oranges come from florida
> id : 16 ---- Re: most oranges come from florida (parentid 10)
> id : 22 --------- Re: most oranges come from florida (parentid 16)
> id : 24 --------- Re: most oranges come from florida (parentid 22)
> id : 28 ---- Re: most oranges come from florida (parentid 16)
>
> i want the rows to know the id directly above itself
> so for example, row 5 (id 28) will some how know its parentid (16) is not
> directly above it and is not accociated with the result its above (24)
>
> i want to 'highlight' a row when the parent it belongs to is directly
> above
> and do nothing if its not.
$query = "select ID, parentid from ...";
$lines = mysql_query($query);
$last_id = '';
while (list($ID, $parentid) = mysql_fetch_row($lines)){
$class = $last_id == $parentid ? 'highlight' : 'normal';
echo "<span class='$class'>$ID</span><br />\n";
$last_id = $ID;
}
--
Like Music?
http://l-i-e.com/artists.htm
--- End Message ---
--- Begin Message ---
thanks a million, it works.
so simple and i tried something similar except i was using parentid at the
end of the loop vs the id itself.
thanks again, its not the first time you helped me out :)
----- Original Message -----
From: "Richard Lynch" <[EMAIL PROTECTED]>
> On Thu, April 7, 2005 1:17 pm, Sebastian said:
> > i am developing a comment/discussion board and i want to display the
> > results
> > in a threaded style. so far i have it all working except this one issue:
> >
> > each row has an ID and a parentid, say i have 5 rows:
> >
> > id : 10 most oranges come from florida
> > id : 16 ---- Re: most oranges come from florida (parentid 10)
> > id : 22 --------- Re: most oranges come from florida (parentid 16)
> > id : 24 --------- Re: most oranges come from florida (parentid 22)
> > id : 28 ---- Re: most oranges come from florida (parentid 16)
> >
> > i want the rows to know the id directly above itself
> > so for example, row 5 (id 28) will some how know its parentid (16) is
not
> > directly above it and is not accociated with the result its above (24)
> >
> > i want to 'highlight' a row when the parent it belongs to is directly
> > above
> > and do nothing if its not.
>
> $query = "select ID, parentid from ...";
> $lines = mysql_query($query);
> $last_id = '';
> while (list($ID, $parentid) = mysql_fetch_row($lines)){
> $class = $last_id == $parentid ? 'highlight' : 'normal';
> echo "<span class='$class'>$ID</span><br />\n";
> $last_id = $ID;
> }
--- End Message ---
--- Begin Message ---
running whoami in php returns : " root "
--- On Fri 04/08, Chris W. Parker < [EMAIL PROTECTED] > wrote:
From: Chris W. Parker [mailto: [EMAIL PROTECTED]
To: [EMAIL PROTECTED], [email protected]
Date: Fri, 8 Apr 2005 10:21:16 -0700
Subject: RE: [PHP] sessions not being stored : DAY 2
Yuri Huitr�n Alvarado <mailto:[EMAIL PROTECTED]><br> on Friday, April 08,
2005 10:02 AM said:<br><br>> * the /tmp directory is owned by root<br>> * the
/tmp/sess directory is owned by the apache user and has 777<br>> permissions
<br>> * the directory in php.ini to store sessions is : /tmp/sess<br>> *
there's not a php user<br><br>Try running the system command 'whoami' within
PHP to see what user is being used.<br><br><br><br>Chris.<br><br>--<br>PHP
General Mailing List (http://www.php.net/)<br>To unsubscribe, visit:
http://www.php.net/unsub.php<br><br>
_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
--- End Message ---
--- Begin Message ---
Yuri Huitr�n Alvarado wrote:
running whoami in php returns : " root "
Are you saying that you typed 'whoami' from a shell, and it gave you root.
Or are you saying that when you did <?php `whoami` ?> you got 'root'. If
this is the case, then you are running a big security risk if your PHP
scripts are executing with root permissions.
--- End Message ---
--- Begin Message ---
Chris W. Parker wrote:
Read www.php.net/array_keys and you shall have your answer.
From the php docs:
<?php
$array = array(0 => 100, "color" => "red");
print_r(array_keys($array));
?>
Will output.
Array
(
[0] => 0
[1] => color
)
Duh! Yes, I replied a little too fast on that one.
/Mattias
--
More views at http://www.thorslund.us
--- End Message ---
--- Begin Message ---
Need libmcrypt.dll for Windows PHP 4.3.9. Can anyone send it to me?
Thanks
HarryG
--- End Message ---
--- Begin Message ---
Go to http://ftp.emini.dk/pub/php/win32/mcrypt/
On Apr 9, 2005 2:05 PM, HarryG <[EMAIL PROTECTED]> wrote:
> Need libmcrypt.dll for Windows PHP 4.3.9. Can anyone send it to me?
>
> Thanks
>
> HarryG
--- End Message ---
--- Begin Message ---
Got it. Thanks.
"Computer Programmer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Go to http://ftp.emini.dk/pub/php/win32/mcrypt/
>
> On Apr 9, 2005 2:05 PM, HarryG <[EMAIL PROTECTED]> wrote:
> > Need libmcrypt.dll for Windows PHP 4.3.9. Can anyone send it to me?
> >
> > Thanks
> >
> > HarryG
--- End Message ---
--- Begin Message ---
On Friday 08 April 2005 20:22, Matthew Weier O'Phinney wrote:
> * Johannes Findeisen <[EMAIL PROTECTED]>:
> > If i understand right, all variables should be declared in PHP5. So
> > why is it possible to add a membervariable called "c" to the object
> > without making a declaration? I got no error with this. I thought
> > E_STRICT should show me things like that. Could someone explain me
> > that?
>
> You don't understand correctly. Class properties/attributes do not need
> to be explicitly declared in PHP. This did *not* change in PHP5. What
> changed in PHP5 is visibility. By default, unless declared otherwise, a
> class attribute is publicly visible -- the same behaviour seen in PHP4.
Okay, allright. I missunderstood that. But wouldn't it be nice to see things
like this in the error log when E_STRICT is activated. I know some
programming languages and i ever have dreamed about some features like this
in PHP5 and the main thing i was dreaming about was strict declaration. Now
since PHP5 i have thought about programming PHP again because of features
which would help me debugging my code. And this is not implemented perfectly.
I have some days ago allready posted a PHP5 issue which i thought that it
should be catched from the internal error handling with E_STRICT on. You can
see it here:
http://www.spinics.net/lists/php/msg117368.html
Thanks,
have a nice day.
Johannes Findeisen
--- End Message ---
--- Begin Message ---
Hello,
I've posted a miniature version of my code here to explain my problem.
<CODE>
<?
phpinfo();
ob_start();
register_shutdown_function("hello");
echo ("HELLO");
die();
function hello()
{
$logfile = "logfile";
$error_string = ob_get_contents();
if(!$handle = fopen($logfile, "a"))
{
echo("Could not open logfile for writing!");
ob_end_flush();
exit;
}
if(fwrite($handle, $error_string) === FALSE)
{
echo("Could not write to logfile!");
ob_end_flush();
exit;
}
fclose($handle);
ob_end_clean();
}
?>
</CODE>
This simply does not work the way it should. i.e ob_get_contents doen't return
any string and the buffer just gets flushed by itself at termination.
Though the PHP manual says it is not possible to retrieve the contents of any
output buffers using ob_get_contents() with PHP < 4.0.6. But I am using PHP 5.
x.x
Thanks in advance for any help.
Prathap
--- End Message ---
--- Begin Message ---
Hi All,
I did a source install, of which I'm a newb at, and then created a
index.php file containing the following,
<?php
phpinfo(); ?>
but, that shows in the browser, Firefox, when typing
localhost/index.php. I've confirmed that httpd is running, and generates
pages as I got the Apache welcome page b4 creating the index.php page.
I'm swaying towards that I may have compiled the source wrongly, like
leaving something out. Happy to post whatever is needed to help you help
me here. Cheers.
Mark Sargent.
[EMAIL PROTECTED] php-5.0.3]# ./configure --with-mysql=/usr/local/mysql
too much to post.....
[EMAIL PROTECTED] php-5.0.3]# make install
Installing PHP SAPI module: cgi
Installing PHP CGI into: /usr/local/bin/
Installing PEAR environment: /usr/local/lib/php/
[PEAR] Archive_Tar - installed: 1.1
[PEAR] Console_Getopt - installed: 1.2
[PEAR] PEAR - installed: 1.3.3
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
[PEAR] XML_RPC - installed: 1.1.0
Installing build environment: /usr/local/lib/php/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
program: phpize
program: php-config
program: phpextdist
[EMAIL PROTECTED] php-5.0.3]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
--- End Message ---
--- Begin Message ---
On Saturday 09 April 2005 20:17, Mark Sargent wrote:
> I did a source install, of which I'm a newb at, and then created a
> index.php file containing the following,
>
> <?php
> phpinfo(); ?>
>
>
>
> but, that shows in the browser, Firefox, when typing
> localhost/index.php. I've confirmed that httpd is running, and
> generates pages as I got the Apache welcome page b4 creating the
> index.php page. I'm swaying towards that I may have compiled the source
> wrongly, like leaving something out. Happy to post whatever is needed
> to help you help me here. Cheers.
You seem to have missed out some important steps ie editing httpd.conf so
that it knows about PHP. RTFM for details.
--
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
------------------------------------------
New Year Resolution: Ignore top posted posts
--- End Message ---
--- Begin Message ---
Mark Sargent wrote:
Hi All,
I did a source install, of which I'm a newb at, and then created a
index.php file containing the following,
<?php
phpinfo(); ?>
but, that shows in the browser, Firefox, when typing
<snip>
You need to tell Apache how to handle php files.
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--- End Message ---
--- Begin Message ---
John Nichel wrote:
Mark Sargent wrote:
Hi All,
I did a source install, of which I'm a newb at, and then created a
index.php file containing the following,
<?php
phpinfo(); ?>
but, that shows in the browser, Firefox, when typing
<snip>
You need to tell Apache how to handle php files.
Hi All,
sorry guys, quite new to all this. On this page,
http://www.php.net/manual/en/install.unix.php
it has 2 examples,
4-1 and 4-2. Little confused with what shared and static modules are and
which 1 pertains to me. I was wanting to get php running to allow base
to show results of snort logging in mysql. Snort/Mysql/Base etc are
installed fine, just php is the last hurdle. Again, sorry. Cheers.
P.S. Ah, sorry, John, think I emailed you this post directly,
unintentionally
Mark Sargent.
--- End Message ---