[PHP] Re: APC with horde/imp: 99.9% miss rate and only one cached file

2010-04-09 Thread Derek Chen-Becker
Well, downgrading APC from 3.1.3b1 to 3.0.19 fixed it. Working great now!

On 04/08/2010 02:21 PM, Derek Chen-Becker wrote:
 I suspect I've either done something horribly wrong or found a weird
 bug, probably the former. I'm running PHP 5.2.13 on Solaris 10 under
 Apache 2.2.14. Memory usage is 98.8% free (default 1 slice of 30MB).
 Here are stats on the cache:
 
 Cached Files  1 (288.2 KBytes)
 Hits  4146
 Misses3579033
 Request Rate (hits, misses)   358.68 cache requests/second
 Hit Rate  0.42 cache requests/second
 Miss Rate 358.26 cache requests/second
 Insert Rate   0.00 cache requests/second
 Cache full count  0
 
 And here is my config in php.ini:
 
 extension=apc.so
 error_reporting = E_ALL ^ E_DEPRECATED
 apc.report_autofilter = 1
 log_errors = 1
 
 If I restart apache, a different file gets cached each time (it rotates
 between a very small subset of all of the PHP files in horde).
 Sometimes, 2 or even 3 files get cached, but I've never had it go above
 3. I've been googling around and reading the list archives but I can't
 find anything that seems to be related to this. Am I misunderstanding
 the purpose of APC? I thought that it would attempt to cache all PHP
 files that are requested.
 
 I turned on the report_autofilter in an attempt to diagnose the issue,
 but nothing shows up in the error log. Here is the config as shown by
 apc.php:
 
 apc.cache_by_default  1
 apc.canonicalize  1
 apc.coredump_unmap0
 apc.enable_cli0
 apc.enabled   1
 apc.file_md5  0
 apc.file_update_protection2
 apc.filters   
 apc.gc_ttl3600
 apc.include_once_override 0
 apc.lazy_classes  0
 apc.lazy_functions0
 apc.max_file_size 1M
 apc.mmap_file_mask
 apc.num_files_hint1000
 apc.preload_path  
 apc.report_autofilter 1
 apc.rfc1867   0
 apc.rfc1867_freq  0
 apc.rfc1867_name  APC_UPLOAD_PROGRESS
 apc.rfc1867_prefixupload_
 apc.rfc1867_ttl   3600
 apc.shm_segments  1
 apc.shm_size  30
 apc.stat  1
 apc.stat_ctime0
 apc.ttl   0
 apc.use_request_time  1
 apc.user_entries_hint 4096
 apc.user_ttl  0
 apc.write_lock1
 
 
 Any help would be greatly appreciated.
 
 Thanks,
 
 Derek
 


-- 
--
Derek Chen-Becker
Senior Network Engineer, Security Architect
CPI Corp, Inc.
1706 Washington Ave
St. Louis, MO 63103
Phone: 314-231-7711 x6455
Fax:   314-613-6724
dbec...@cpicorp.com
PGP Key available from public key servers
Fingerprint: E4C4 26C0 8588 E80A C29F  636D 1FBE 0FE3 2871 4AE8
--

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



[PHP] APC with horde/imp: 99.9% miss rate and only one cached file

2010-04-08 Thread Derek Chen-Becker
I suspect I've either done something horribly wrong or found a weird
bug, probably the former. I'm running PHP 5.2.13 on Solaris 10 under
Apache 2.2.14. Memory usage is 98.8% free (default 1 slice of 30MB).
Here are stats on the cache:

Cached Files1 (288.2 KBytes)
Hits4146
Misses  3579033
Request Rate (hits, misses) 358.68 cache requests/second
Hit Rate0.42 cache requests/second
Miss Rate   358.26 cache requests/second
Insert Rate 0.00 cache requests/second
Cache full count0

And here is my config in php.ini:

extension=apc.so
error_reporting = E_ALL ^ E_DEPRECATED
apc.report_autofilter = 1
log_errors = 1

If I restart apache, a different file gets cached each time (it rotates
between a very small subset of all of the PHP files in horde).
Sometimes, 2 or even 3 files get cached, but I've never had it go above
3. I've been googling around and reading the list archives but I can't
find anything that seems to be related to this. Am I misunderstanding
the purpose of APC? I thought that it would attempt to cache all PHP
files that are requested.

I turned on the report_autofilter in an attempt to diagnose the issue,
but nothing shows up in the error log. Here is the config as shown by
apc.php:

apc.cache_by_default1
apc.canonicalize1
apc.coredump_unmap  0
apc.enable_cli  0
apc.enabled 1
apc.file_md50
apc.file_update_protection  2
apc.filters 
apc.gc_ttl  3600
apc.include_once_override   0
apc.lazy_classes0
apc.lazy_functions  0
apc.max_file_size   1M
apc.mmap_file_mask  
apc.num_files_hint  1000
apc.preload_path
apc.report_autofilter   1
apc.rfc1867 0
apc.rfc1867_freq0
apc.rfc1867_nameAPC_UPLOAD_PROGRESS
apc.rfc1867_prefix  upload_
apc.rfc1867_ttl 3600
apc.shm_segments1
apc.shm_size30
apc.stat1
apc.stat_ctime  0
apc.ttl 0
apc.use_request_time1
apc.user_entries_hint   4096
apc.user_ttl0
apc.write_lock  1


Any help would be greatly appreciated.

Thanks,

Derek

-- 
--
Derek Chen-Becker
Senior Network Engineer, Security Architect
CPI Corp, Inc.
1706 Washington Ave
St. Louis, MO 63103
Phone: 314-231-7711 x6455
Fax:   314-613-6724
dbec...@cpicorp.com
PGP Key available from public key servers
Fingerprint: E4C4 26C0 8588 E80A C29F  636D 1FBE 0FE3 2871 4AE8
--

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



Re: [PHP] adding Back to Search results link

2007-08-16 Thread Derek
Lets just say that option wouldn't be a great moment in design history

Bastien Koert [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

what about hadding the search form elements to the results page and letting 
the users search right from there

bastien To: php-general@lists.php.net From: [EMAIL PROTECTED] Date: Wed, 
15 Aug 2007 15:44:46 -0500 Subject: Re: [PHP] adding Back to Search 
results link  Jim and Brad.  Thanks for the feedback. I was thinking it 
was something simple like a back  button. But the problem that arises when 
I use this method is on Form 3.  If I go through the steps, and make a 
change to an item on Form 3. Then use  the a 
href=javascript:history.go(-2);Return to search  
results/a.everything works fine. But if I dont make any changes to 
Form 3. then this takes me all the way  back to the search page.  People 
in my group use this form to update database information for a number  of 
items. Once they make changes, they would like to go back to the search  
results, instead of having to run the same search again and again. 
Jim Lucas [EMAIL PROTECTED] wrote in message  
news:[EMAIL PROTECTED]  Derek Moon wrote:  I am trying to 
imporve a web application that my group uses.   Basically there are 3 
forms that work together Form 1  form 2   Form 1 - searchs for 
enterend values  Form 2 - returns search results, letting you 
individually select any item  Form 3 - lets you edit a specific 
individual item   I want to make a link on the Form 3 that returns you 
to form Form 2  basically a Back to Search results link.   I'm 
thinking that there is a way to pass the query string, but I am a   
newbie and I'm not sure that I am going about this the right way.   
Anyone have any advice or knowledge to share?   I would personally just 
use the back button. Isn't that what it is there   for?   But 
seriously, if you changed the method on Form 1 to use get instead of   
post, you could then just have a button that sends you back 1 in your   
history, or 2 in this case.  ...  ...   Actually wait, it would be 
3   form 1 - results - edit - save changes -\  
\--/   hope the format is correct on my 
ascii art :)   nope, now that I read it again, it is only 2 back in the 
history   So something like this for the back button   a 
href=javascript:history.go(-2);Return to search results/a   That 
should do   GUIDE LINES FOR USE OF METHOD in forms  POST Only use post 
when you are submitting a form  that will change the data that you are 
submitting   GET Use this for forms that do not change get, but  only 
retrieve data. --   Jim Lucas   Some men are born to 
greatness, some achieve greatness,  and some have greatness thrust upon 
them.   Twelfth Night, Act II, Scene V  by William Shakespeare   --  
  PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
http://www.php.net/unsub.php
_
Connect to the next generation of MSN Messenger
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline
 

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



Re: [PHP] adding Back to Search results link

2007-08-16 Thread Derek
Thanks for the help, Kirk.

The form 2 uses a _GET to call the information from Form 1.

So you select the serach criteria on Form 1, Form 2 returns the criteria, 
Form 3 is the result of a selection made on Form 2.  And for some reason I 
can't pass that Query String from Form 1 into Form 3.

I am still having problems passing the string. But only because at the point 
a user reaches form 1 the Session is already active. Maybe I am just placing 
the

 $_SESSION['search_results_querystring'] = $_SERVER['QUERY_STRING'];

in the wrong place. I assume this has to be placed before right after my 
include statements.

I am still messing around with it. I have also been told that maybe passing 
the value as a part of the (already established) cookie may work as well. 
Both options seem to use the same logic.

I'll keep you posted.


Kirk Friggstad [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Derek:

 Does form 1 use POST or GET to call form 2? If it uses GET, you
 could store the search page URL  in a $_SESSION variable - something
 like this in your search results (form 2):

 $_SESSION['search_results_querystring'] = $_SERVER['QUERY_STRING'];

 and in your editing page (form 3):

 a href=form2.php??php echo $_SESSION['search_results_URL'] ?Back
 to search results/a

 (You'll need session support in both pages, of course - make sure you
 call session_start() before working with the $_SESSION array).

 If form 1 uses POST, then it'll get a little more complicated - you
 could try saving the $_POST data in the session (think there was a
 recent thread on this list regarding that) and creating a form with
 hidden elements on form 3 that does a POST back to form 2.

 I'm a bit of a PHP newbie myself (just coming out of a long career in
 ASP/VBscript development), so I'd appreciate any comments, (gentle)
 criticism, etc. Hope this helps.

 Kirk

 On 8/15/07, Derek [EMAIL PROTECTED] wrote:
 Jim and Brad.

 Thanks for the feedback. I was thinking it was something simple like a 
 back
 button. But the problem that arises when I use this method is on Form 3.

 If I go through the steps, and make a change to an item on Form 3. Then 
 use
 the a href=javascript:history.go(-2);Return to search
 results/a.everything works fine.
 But if I dont make any changes to Form 3. then this takes me all the way
 back to the search page.

 People in my group use this form to update database information for a 
 number
 of items. Once they make changes, they would like to go back to the 
 search
 results, instead of having to run the same search again and again.




 Jim Lucas [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Derek Moon wrote:
  I am trying to imporve a web application that my group uses.
 
  Basically there are 3 forms that work together Form 1  form 2
 
  Form 1 - searchs for enterend values
  Form 2 - returns search results, letting you individually select any 
  item
  Form 3 - lets you edit a specific individual item
 
  I want to make a link on the Form 3 that returns you to form Form 2
  basically a Back to Search results link.
 
  I'm thinking that there is a way to pass the query string, but I am a
  newbie and I'm not sure that I am going about this the right way.
 
  Anyone have any advice or knowledge to share? 

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



[PHP] adding Back to Search results link

2007-08-15 Thread Derek Moon
I am trying to imporve a web application that my group uses.

Basically there are 3 forms that work together Form 1  form 2

Form 1 - searchs for enterend values
Form 2 - returns search results, letting you individually select any item
Form 3 - lets you edit a specific individual item

I want to make a link on the Form 3 that returns you to form Form 2
basically a Back to Search results link.

I'm thinking that there is a way to pass the query string, but I am a newbie 
and I'm not sure that I am going about this the right way.

Anyone have any advice or knowledge to share? 

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



Re: [PHP] adding Back to Search results link

2007-08-15 Thread Derek
Jim and Brad.

Thanks for the feedback. I was thinking it was something simple like a back 
button. But the problem that arises when I use this method is on Form 3.

If I go through the steps, and make a change to an item on Form 3. Then use 
the a href=javascript:history.go(-2);Return to search 
results/a.everything works fine.
But if I dont make any changes to Form 3. then this takes me all the way 
back to the search page.

People in my group use this form to update database information for a number 
of items. Once they make changes, they would like to go back to the search 
results, instead of having to run the same search again and again.




Jim Lucas [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Derek Moon wrote:
 I am trying to imporve a web application that my group uses.

 Basically there are 3 forms that work together Form 1  form 2

 Form 1 - searchs for enterend values
 Form 2 - returns search results, letting you individually select any item
 Form 3 - lets you edit a specific individual item

 I want to make a link on the Form 3 that returns you to form Form 2
 basically a Back to Search results link.

 I'm thinking that there is a way to pass the query string, but I am a 
 newbie and I'm not sure that I am going about this the right way.

 Anyone have any advice or knowledge to share?

 I would personally just use the back button. Isn't that what it is there 
 for?

 But seriously, if you changed the method on Form 1 to use get instead of 
 post, you could then just have a button that sends you back 1 in your 
 history, or 2 in this case.
 ...
 ...

 Actually wait, it would be 3

 form 1 - results - edit - save changes -\
  \--/

 hope the format is correct on my ascii art :)

 nope, now that I read it again, it is only 2 back in the history

 So something like this for the back button

 a href=javascript:history.go(-2);Return to search results/a

 That should do

 GUIDE LINES FOR USE OF METHOD in forms
 POST Only use post when you are submitting a form
 that will change the data that you are submitting

 GET Use this for forms that do not change get, but
 only retrieve data.



 -- 
 Jim Lucas

Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them.

 Twelfth Night, Act II, Scene V
 by William Shakespeare 

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



Re: [PHP] XML Parser set option

2005-12-20 Thread Derek Williams

Amol,

Pretty sure that it means the white space after a tag.  for example:

myName  Joe Dempsey/myName

or (even worse, with CR)

myName 
   Joe Dempsey

/myName
Amol Hatwar wrote:

Hi,

The PHP Manual entry for xml_parser_set_option lists an option called:
XML_OPTION_SKIP_WHITE. I really couldn't decipher what this option
enables or disables.

The manual entry itself is a bit terse:
Whether to skip values consisting of whitespace characters.

Doodling around with it in code got me no luck. Any ideas on what kind
of whitespaces it does supress?

Regards,

ah

  


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



Re: [PHP] looking for php programmers in mumbai / bombay

2005-12-14 Thread Derek Williams
not quite PC, but why do you need to be in mumbai or bombay, is the 
client located there?


mailing wrote:
we are looking for experienced php programemers in mumbai or bombay. 
full time or freelance...


please contact at [EMAIL PROTECTED]

sumeet shroff



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



Re: [PHP] Questions from a ColdFusion Developer

2005-12-11 Thread Derek Williams
Not sure if I can give a good answer, but try doing a var_dump on 
$_SESSION[Search Result] and see what you get.  I suspect that it is 
null.  If that's the case then track down where it is getting assigned.  
It should look something like $_SESSION[SearchResult] = $users.


Christopher Jordan wrote:

Hi folks,
  
 I'm a ColdFusion  developer,  but I'm branching out into  PHP because alot of  my smaller clients don't want to pay for CF.
  
  Anyway, a bit of background:
  
  I've got a page that does a search on one of my tables. I'm using  Justin Vincent's ezSQL (http://php.justinvincent.com) to fetch the  result set into an object that can be referenced nicely. Here's what  his example code looks like:
  
  // Select multiple records from the database and print them out..

  $users = $db-get_results(SELECT name, email FROM users);
  foreach ( $users as $user ){
   //  Access data using object syntax
  echo $user-name;
  echo $user-email;
  }
  
  So far so good. So I've got an iframe on the page which (I hope) will  eventually display the results of the search. The user will then click  on the search result for which they want to view the details, and the  information from that row will be populated inside the main page (the  one that houses the iframe).
  
  Hope that makes sense. 
  
  Okay, so my trouble is that I don't know how to enable the page inside  the iframe to have access to the result object created by Justin  Vincent's nifty little class. In CF I can just say:
  
 session.oResults = queryname
  
  CF automatically returns any query as an object with the name of the  query as the object name (i.e. queryname.MyIdField, or  queryname.EmployeeNumber, etc.) Using a line like the one above  (assigning the query object to a session variable) all of my subsequent  requests would have access to that result set simply by using the  object.
  
  I'm *sure* there's a way to do this in PHP. I'm just falling short of finding the answer. I've tried:
  
  $_SESSION[SearchResult] = $db-get_results($query);
  
  But it doesn't seem to work. I may have some other problem using the object. I just re-read my error and it says:
  
  Fatal error: Call to a member function get_results() on a non-object in inventorymanager.php on line   93
  
  hmm... I sure would appreciate a little guidence here. Even if my  problem is with the way I'm using the object, is the idea of assigning  that object to the session scope the right way to do this or is there a  better approach. To that end, I suppose I'm looking for an idea of the  best practice.
  
  Thanks!

  Christopher Jordan
  Planet Access
  Arlington, TX
  



-
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping 
  


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



Re: [PHP] error reporting php-5.0.4-10.4 on FC4

2005-10-23 Thread Derek Williams

Bob Hartung wrote:

Jasper
  If if make a file containing only
  ?php
phpinfo() ;
  ?
  I get what I expected.

  If I make a file containing
?php

phpinfo() ;

// Now a simple class and a call to the class
class Simple()
{
void __construct()
{
echo In the constructor ;
}
}

$newSimple = new Simple ;

?

  I get NO output or errors in the browser window.  If I select view 
source it returns:

   htmlbody/bodyhtml

Eh?  Anyone with any other ideas

Tnx

Bob Hartung

Jasper Bryant-Greene wrote:
snip all before.

How about ?php error_log('this should write to the file 
var/log/php_errors'); echo 'a test to write to error log file'; ?


Which should write to your error log file,php_errors, in the existing 
directory var/log.  The browser should also render a test to write to 
error log file.


Have you tried changing the log file name to something else? I don't 
think that php_errors is a key word, but you never know.


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



Re: [PHP] Designing a complicated multipage form with sessions

2005-10-21 Thread Derek Williams

Andy Pieters wrote:

Hi List

I am quite experienced in PHP.  I have been asked to design a complicated form 
in php that spans multiple pages and has many subitems.  For instance if they 
select one checkbox, more details are required in the form of a dropdown list 
or radio buttons.


It would allow browsing the different pages randomly, and final validation is 
only to be performed on the last page.  In case of errors, it would load the 
page where the first error is found and display a message and highlight the 
faults.


I currently made a list of all vars in an xml file, and associated a page 
number for each.  Now when the page loads it looks up the vars used on that 
page and loads them from post (if present and stores them in session right 
away) or loads them from session if no post is present.


Any ideas for improvements, common pitfalls, etc are highly appreciated.


With kind regards


Andy

  
You may want to consider a mixed AJAX and clientside javascript 
validation.  Requiring the user to go through a complex form and delay 
validation until the end may fustrate users.  I would avoid putting 
business rules into the clientside javascript, but it would be 
reasonable to check for things like valid dates, required fields 
completed etc.  You can also use simple clientside javascript to create 
or expose appropriate dropdowns as needed.  In this case of items where 
more complex business rules need to be validated you can hit the backend 
via AJAX (XML over http) to load further clientside rules or perform 
autocompletion (e.g. zipcode to city state lookup).  See googles suggest 
site for example of autocompletion approach.  Since you are already in 
the XML world, you may want to consider creating your page via an XSLT 
transform of an XML representation of the data. 


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



Re: [PHP] Modular Authoring System

2005-10-21 Thread Derek Williams

Sascha,

We're starting work on a similar (to be open sourced) project, XML/XSLT 
based.  We're also putting together a process creation and tracking 
mechanism.  I would be glad to take a look at the design and code.  We 
have a great XSLT programmer.


Sascha Braun wrote:

Hi,

I am now working on a concept for a webportal software in about 2 and a
halv year. As far as I am in the development of the project I was able
to write an authoring system with support of unlimited language transla-
tions and xml based frontend/screen engine.

All html forms and screens are generated via parsed xml frontend tem-
plates. The navigation elements are consisting of xml elements too.

Alot of things can be done, without the developer has to write html or
php code very much.

The media asset management system is able to convert images, videos and
in near future audio files to any format the player needs to play the
video or audio file without use of mplayer-plugin or windows media pla-
yer.

I wrote a question catalog management system, with which it is very easy
to add question catalogs to the content management system, so individual
services can be offered to customers, by evaluation of the user given
answers to the system.

The user management has a very detailed rights management, and the user
profiles are consisting of xml profile element templates which are
editable, thru the form engine, which is reading the xml profile tem-
plates and is displaying them as forms.

The screentext management is a nice frontend to the screentext database,
in which all frontend screentexts are stored, while the documents of the
content management system are entered by a special xml editor i wrote,
with wich the webauthor dont has to be able to know any html tags or
such things, so write content for the website.

In future i want to add the possebility to the editor, that authors are
going to be able to add tables, generated by the GD lib, so informations
cant just be grabbed by other companys too easy, so informations cant
really be stolen. And i want to add a frontend to the JPGraph lib, so
the authors will be able to enter values into the documents they are
working on, to add diagrams to the document.

I nice working template engine has to be written, so the design of the
hole page can change by daytime or the time of the year.

I added a cronjob management tool, so alot of tasks can be executed
timed as needed. If a customer of an couple finder service want to get
out of his contract, it can be done automatically to the end of the
month, without the site administrators have to do anything about it.

The Online shopping module should consist of a kind of neural network to
find out, what kind of products is fitting best to a customer with
specific account values based on the question catalog management tool.

Later I want to add an tracking system, a product managment system, and
marketing management tool, a statistics tool and many other things.

The hole system is build up modular and is based on php5.

No other programmer did ever take a look at this system, so I dont
really now, if my design is well, or if my php code is just wellformed.

I'm went to work alone, because i did so in the last 8 years.

My question is now, as this concept and the authoring system itself is
not opensource at the moment. If somepeople would like to take a look at
it, and maybe discuss with me, wheather to make it opensource, or
letting it stay as a commercial project.

My only goal is, to set up the webportals I have written concepts for in
the last couple of years. But the project is now comming into a size
where its nearly impossible to start anything new, because there still
are alot of holes in the modules.

And my pressure is growing abit.

All i can say, that is is possible to set up a content management based
website including webdesign and all other things can be done with the
authoring system in about 4 - 6 days, instead of one or two month, it
would take to write something like that on your own if you dont use all
of the modules the authoring system is consisting of at the moment.

I'm not the best programmer, but I'm good in software design and concep-
tion. So it would be really nice, to have some people around, who can
take care abit about the quality of the project. And maybe make use of
it, like i want too.

So best regards,

and lets make it happen :)))

Sascha Braun

  


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



Re: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-21 Thread Derek Williams

Probably a really dumb question:

Is php_curl.dll available?

Jay Blanchard wrote:

IIS5 on W2K
PHP 4.4.n
php_curl.dll is not commented.
libeay32.dll  AND ssleay32.dll are in the system folder (system32 too, just
in case)
path to the extensions is correct

Fatal error: Call to undefined function:  in
E:\sitegrp1\TEST20051010\curltest.php on line 3

ack!

Can anyone explain why this isn't working? I know I can't

Thanks!

  


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



Re: [PHP] About iMail Help

2003-11-18 Thread Derek Ford
D. Jame wrote:

Hi,

Anyone know about imail.?



 

could you be any more vague?

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


Re: [PHP] eregi filter

2003-11-18 Thread Derek Ford
Erin wrote:

Anyone have a good eregi filter for passwords?

Regards

R

 

well, for one thing, don't use ereg. Use pcre, as it is faster.

preg_match('/^[a-zA-Z0-9]{5,16}$/',$blah);
that will validate a password containing only upper or lowercase letters 
and numbers, between 5 and 16 characters.

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


Re: [PHP] Re: Moving to php

2003-11-16 Thread Derek Ford
DvDmanDT wrote:

PHP is 99% (if not 100%) backwards compitable... PHP is even stable on
WinME, and on XP.. Lots of ppl use it on 2k as well... Works fine.. And fast
(well, depending on your installation and configuration)... Oh, and about
support.. PHP on windows accutually have it's own official list/newsgroup
(php-win or php.windows).. :)
MySQL and PHP is very good friends.. :)

 

PHP on windows platforms isn't as good as it 'could be'. A lot of the 
windows oriented bugs go unfixed, because most core hackers don't care. 
The major opinion is why fix bugs on a buggy platform?.

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


Re: [PHP] Re: Moving to php

2003-11-16 Thread Derek Ford
DvDmanDT wrote:

Well, yes.. But chanses aren't all that big you'll find any bugs (at least
not windows specific), unless you try the w32api extension or bcompiler
combined with zend optimizer...
 

I've ran into many. The ones that really take the cake are the streams 
bugs, which have been around since the inception of socket support.

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


Re: [PHP] newbie stuck again

2003-11-16 Thread Derek Ford
PAUL FERRIE wrote:

Here's what i have done.  i have downloaded a very simple database manager
from www.hotscripts.com.  It allows me to edit, delete and add new
information to the database.  i have a couple of problems.
1.  form field dont fill with all the data senback from the db to be edited,
as fars as i am aware all fields except 'review' are long enough
2. In my common.php file for connecting to the db i have

?

$database=mysql_connect (localhost, blah, ) or die ('I cannot
connect to the database because: ' . mysql_error());
mysql_select_db (***_vinrev);
$tablename=albums;
?
I have 2 tables in my database and would like to use a drop down menu to
select the table we wish to view and edit.  so taken $tablename out of the
common.php file and having it sset within the main navigation.  i am pretty
sure i can set the drop down menu option but what is/would be the  $query
for returning how many and display table names?
Cheers
Paul
http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html
 

your probably looking for something like 'show tables'.

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


Re: [PHP] fgetcsv

2003-11-16 Thread Derek Ford
zhuravlev alexander wrote:

	Hello.

I wonder if PHP has fgetcsv() function why doesn't
PHP has fputcsv ?
-- zhuravlev alexander
  u l s t u  n o c
([EMAIL PROTECTED])
 

because it would be bloat, basically. We now have file_put_contents in 
php5, which I like...but still view as bloat. You can easily enough use 
fopen and fwrite to add content to the csv file.

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


Re: [PHP] Who controls PHP?

2003-11-15 Thread Derek Ford
John Nichel wrote:

Chris Shiflett wrote:

--- John Smith [EMAIL PROTECTED] wrote:


Please, tell me that Zend is not the dictator here.


No one is a dictator.

Chris


So there is an opening for a dictator then?  How can I get my name on 
the ballot?  ;)

I am the only dictator here.

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


Re: [PHP] newbie question about scope

2003-11-12 Thread Derek Ford
news.comcast.giganews.com wrote:

I am an experienced web developer who is just getting into php.  I have had
a php project fall into my lap and wanted a little advice.  Here is the
scoop:
   A client moved their site from a server (unknown details) to a hosting
facility (php 4.3.2).  Now none of the scripts work.  I have guessed that
they are coming from an earlier version of apache/php.  Anyway it appears
that whoever created the site in the first place did not believe in scoping
variables.  Now any variable that is not properly scoped will not be read by
the server.  I know I can simply scope all of the variables, but I was
hoping there may be an easier way.  Also, how bad is the _REQUEST scope I
read that it could not be trusted, however the previous developer created
the app in such a way that several places a variable could be _GET or _POST.
I apologize for the rambling and possible incoherency of this message, I am
a bit tired.
Matthew

PS. How do you scope queries?

 

You're thinking about this in the wrong way, it seems. The server 
probably has register_globals Off, where previously he was programming 
with it being On. or vise-versa. They should be Off, and should be left 
off, but programming with them off needs some adjusting. Variables such 
as post and get data are now 'superglobals', and must use the 
appropriate arrays; $_GET[], and $_POST[]. There are things like 
extract(), but using them is not advised. as per your question about 
scope queries, be more concrete :)

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


RE: [PHP] mysql_list_fields() bug?

2003-11-10 Thread Derek Ford
as said, use the global construct. This is a scope problem, read the 
manual about variable scope.
php.net/variables.scope

PS: sorry Jay, new mail frontend :)

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


[PHP] Dynamic include_path

2003-03-31 Thread Derek J. Belrose
Hey folks,

What we are looking to do is give a specific include path for each site in our 
customer base.  This running on MacOSX so basically we have sites set up like:

/Users/username/Sites/site.com/phpinc

There can be numerous sites in each users directory and numerous users in /Users.

Basically what we want to do is have each set up to be able to include only from their 
include directory, but the boss is wondering if it can be done on one or two lines for 
every site total.

Basically looking for something like this:
Directory /Users/*/Sites/*/phpinc
php-value include_path = . 
/Directory

or something like it.  

Is this possible?  Or should we just go ahead and set it in each sites declaration?


Derek

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



[PHP] Interfacing with Perl Modules

2002-11-05 Thread Derek Belrose
Hey guys I have a weird question.  We are building a set of Perl modules
to edit system configuration and I've been given the job of writing a
PHP interface for it.  Here's the situation:

Users.pm has all the functionality needed to safely add users to the
system. There are modules for dns, apache, etc, etc...

The frontend should interface with these modules, calling their
functions when needed.

Does anyone have any ideas how I can do this? 

Derek


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




[PHP] Problem with set_time_limit() and uploading large files

2002-10-25 Thread derek fong
Hi,

I am having a major problem getting set_time_limit() to work at all 
with PHP 4.2.3 running as a CGI program under IIS for Windows 2000 (I 
originally posted this message to php-win, but am hoping someone here 
can shed some light on this).  I have a form that accepts large files 
for upload, with the following lines at the top of the form action 
script:

?php
// let this script take as long as it needs to complete its work
// and ignore if user hits stops button in his browser
set_time_limit(0);
ignore_user_abort(true);

// include site-wide configs and other include files
require_once('../includes/site.php');
...

If the file upload takes longer than 30 seconds, PHP bombs out with the 
following error:

Fatal error: Maximum execution time of 30 seconds exceeded in 
D:\InetPub\test.php on line 3

I've also tried adding:

ini_set('max_execution_time', 6);

before the set_time_limit() function, but to no avail.  PHP is not 
running in safe mode.  Does anyone have any ideas why this is not 
working as expected?  I'm sure it's something obvious, but I don't know 
what it is.

Thanks in advance,

-f


--
Derek Fong
Web Application Developer
subtitle designs inc. http://www.subtitled.com/

Mistakes are the portals of discovery. --James Joyce
GPG key/fingerprint available upon request 


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



Re: [PHP] Problem with set_time_limit() and uploading large files

2002-10-25 Thread derek fong
Thanks for the tips, but they all checked out in the end.  After 
reporting it as a bug, it turns out it *is* a bug with 4.2.3 (whether 
it's only with Win2000, I'm not sure), but has been fixed in CVS.  Now 
I can rest a little easier...  =)

-f


--
Derek Fong
Web Application Developer
subtitle designs inc. http://www.subtitled.com/

Mistakes are the portals of discovery. --James Joyce
GPG key/fingerprint available upon request 


On Friday, October 25, 2002, at 05:29  pm, @ Edwin wrote:

Hello,

Just a few ideas...

derek fong [EMAIL PROTECTED] wrote:


Hi,

I am having a major problem getting set_time_limit() to work at all
with PHP 4.2.3 running as a CGI program under IIS for Windows 2000 (I
originally posted this message to php-win, but am hoping someone here
can shed some light on this).  I have a form that accepts large files
for upload, with the following lines at the top of the form action
script:

?php
// let this script take as long as it needs to complete its work
// and ignore if user hits stops button in his browser
set_time_limit(0);


Try another number. Who knows? Might work... :)

...[snip]...


I've also tried adding:

ini_set('max_execution_time', 6);


+ Check whether ini_set() was successful.
+ I know you can change max_execution_time inside your script but try
changing it in php.ini and restart your server.
+ Perhaps, you can lower the number. (Is that 60,000 seconds?)

- E

...[snip]...






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




[PHP] File typing

2002-05-24 Thread Derek Piper


Hi,

Does anyone know if there are functions in PHP or an extension for
getting the mime type (and possibly a description) of ANY kind of
file? I know that the array that the getimagesize() function returns
has an image type field, but I'd like to be able to determine the
appropriate file type for use with a Content-Type: header for any (or
at least the most common) file types, plus be able to pull a
description of the data similar to how the 'file' command works using
the 'magic' file.

Derek

--
Derek Piper ([EMAIL PROTECTED])
Systems Administrator - Stens Corporation

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




[PHP] Rebuilding PHP4 with IBM DB2 Support Causes Apache to Die Upon Restart

2002-03-24 Thread Derek Battams

Currently I have Apache and PHP4 (using the Apache module for PHP4) working
just fine on my server.  However, the RPMs I installed for mod_php4 didn't
include IBM DB2 support.  So I took the source RPM and modified it by simply
adding the following line to the spec file:

--with-ibm-db2

I appended this to the CFLAGS parameter in the spec file.  I then rebuilt
the RPMs and everything built fine.  I then installed them and that was
fine.  However, when I try to restart Apache nothing happens.  It just exits
immediately with nothing written to any logs.  If I remove the
'--with-ibm-db2' flag from the spec file, rebuild the RPMs, then reinstall
them without DB2 support then Apache restarts fine and operates with no
problems.  DB2 is installed, configured, and running on the server.  I've
spent numerous hours (on the weekend none the less) trying to figure this
out, but with no luck.  Any help would be greatly appreciated.

Thanks,

Derek



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




[PHP] Failed to initialize session module

2001-12-06 Thread derek fong

Hello,

I am trying to get session data written to a MySQL table using 
set_session_save_handler(), but am getting the following error when I 
issue session_register(varname) on a page:

Fatal error: Failed to initialize session module in 
/Library/WebServer/Documents/VirtualHosts/www/admin/en/login.php on 
line 4

I have set session.save_handler to user and session.save_path to 
mysql://USER:PASS@localhost/DB in my php.ini file.  File-based 
sessions seem to work fine with session.save_handler set to files and 
session.save_path to /tmp.  I am using the following code as my save 
handler (taken from Web Application Development With PHP 4.0 by 
Tobias Ratschiller and Till Gerken):

?php
$sess_mysql = array();
$sess_mysql[open_connection] = true;
$sess_mysql[hostname] = localhost;
$sess_mysql[user] = USER;
$sess_mysql[password] = PASS;
$sess_mysql[db] = DB;
$sess_mysql[table] = sessions;

function sess_mysql_open($save_path, $sess_name)
{
global $sess_mysql;

if ($sess_mysql[open_connection])
{
$link = mysql_pconnect($sess_mysql[hostname], 
$sess_mysql[user],
$sess_mysql[password]) or die(mysql_error());
}

return (true);
}


function sess_mysql_read($sess_id)
{
global $sess_mysql;
$result = mysql_db_query($sess_mysql[db], SELECT data FROM 
.$sess_mysql[table] . WHERE id = 
'$sess_id') or
die(mysql_error());

if (mysql_num_rows($result) == 0)
{
return ();
}

$row = mysql_fetch_array($result);
mysql_free_result($result);

return ($row[data]);
}


function sess_mysql_write($sess_id, $val)
{
global $sess_mysql;

$result = mysql_db_query($sess_mysql[db], REPLACE INTO 
.$sess_mysql[table] . VALUES 
('$sess_id', '$val', null)) or
die(mysql_error());

return (true);
}


function sess_mysql_destroy($sess_id)
{
global $sess_mysql;

$result = mysql_db_query($sess_mysql[db], DELETE FROM 
.$sess_mysql[table] . WHERE id = 
'$sess_id') or
die(mysql_error());

return (true);
}


function sess_mysql_gc($max_lifetime)
{
global $sess_mysql;

$old = time() - $max_lifetime;

$result = mysql_db_query($sess_mysql[db], DELETE FROM 
.$sess_mysql[table] . WHERE 
UNIX_TIMESTAMP(t_stamp)  $old) or
die(mysql_error());

return (true);
}

session_set_save_handler(sess_mysql_open, , sess_mysql_read, 
sess_mysql_write,
sess_mysql_destroy, sess_mysql_gc);
?


I have also tried Sam Johnston's PEAR Custom Session Handler for PHP4 
(http://sourceforge.net/projects/pearsession/), but I get the same 
error.  Like I said, file-based sessions are working fine, but any 
custom handler bombs with the error I noted above.  This is all 
running under Mac OS X 10.1.1, PHP 4.0.6 using the PEAR DB libraries 
(among others) and MySQL 3.23.43.

What could be causing the error?  I've searched and searched but 
can't seem to find any answers.  Thanks in advance,

-f


-- 
Derek Fong
Web Application Developer
subtitle designs inc. http://www.subtitled.com/

Mistakes are the portals of discovery. --James Joyce
 GPG key/fingerprint available upon request 


Re: [PHP] Re: Loading message

2001-10-25 Thread Derek Mailer

I suspect that PHP does all of it's work and, only when complete, will it
send the generated html to the client.

No matter what you try and do there's no way you can output the progress of
your script to the browser while it is still being parsed.

I could be wrong, but this is my understanding of it.

Is your script really taking that long to be parsed that you need a loading
progress bar or is the html (including graphics etc) just very big?

Anyway,

Hope this helps
Derek

- Original Message -
From: Daniel Alsén [EMAIL PROTECTED]
To: php [EMAIL PROTECTED]; _lallous
[EMAIL PROTECTED]
Sent: Thursday, October 25, 2001 11:27 AM
Subject: RE: [PHP] Re: Loading message


 I will try experimenting with that.

 But my situation is:

 A page with multiple php file includes. The page loads on to the includes,
 loads them and continues to load the includes below.
 I want to display some sort of text while the include still isn´t loaded.

 Likewise i would like to display some sort of loading message while a
 database search is active.

 - Daniel

  -Original Message-
  From: _lallous [mailto:[EMAIL PROTECTED]]
  Sent: den 25 oktober 2001 13:14
  To: [EMAIL PROTECTED]
  Subject: [PHP] Re: Loading message
 
 
  the page won't ever showup unless the webserver finishes
  processing the PHP
  file, therefore the Loading ... will appear while the page is
  waiting for
  its component to finish loading (images, javascripts, flash files, )
 
  therefore what you're asking for has a javascript solution:
 
  1)make a div with width and height about 1000 and absolute position w/
  z-index=1000
  2)add a body.onload event so that when the pages loads you hide
  that layer.
  3)that layer can hold any text or tags as you want like: Please
wait
 
  this division's code:
  div id='loadinglayer'
  style='left:0;top:0;width:1000;height:1000;position:absolute;z-ind
 ex:1000;ba
  ckground:black'Please wait/div
 
  body onload='hidelayer()'
  /body
 
  script
  function hidelayer()
  {
if(document.all)
  document.all['loadinglayer'].style.visibility=hidden;
else
  document.layers['loadinglayer'].visibility=hide;
  }
  /script
 
  hope that helps
  Daniel alsén [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   Hi,
  
   is there a easy way in php to display text like Loading... while
  elements
   on a page is being loaded from the server?
  
   Regards
   # Daniel Alsén| www.mindbash.com #
   # [EMAIL PROTECTED]  | +46 704 86 14 92 #
   # ICQ: 63006462   |  #
  
 
 
 
  --
  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]




**
This e-mail (and any attachment) is intended only for the attention
of the addressee(s). Its unauthorised use, disclosure, storage
or copying is not permitted. If you are not the intended recipient,
please destroy all copies and inform the sender by return e-mail. 
This e-mail (whether you are the sender or the recipient) may be 
monitored, recorded and retained by Business Information 
Publications Limited (BiP). E-mail monitoring/ blocking software 
may be used, and e-mail content may be read at any time.You 
have a responsibility to ensure laws are not broken when composing 
or forwarding e-mails and their contents.
**


-- 
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] Re: Loading message

2001-10-25 Thread Derek Mailer

If what I've said is correct, then in simple terms...

your php code will take a set amount of time to execute everything, then
the html and web page cmoponents are sent to the browser, then
the browser interprets the html and displays the page.

One of the stages listed above seems to be running slow.

I'm fairly new to PHP and haven't attempted to time how long a php script
takes to execute, but you should test this and if it's slow, then I suppose
you want to try and optimise the script.

if you save everything on the web page and examine the size of the file this
might give you an indication as to whether it's a bandwidth problem.  You
could save the html and all components, upload them to the server as a
normal static web page and compare the download times with the dynamic,
PHP-generated page.

copy the html generated into an html editor that highlights html syntax
errors - your browser might be having problems interpreting the html.

If your page starts to display content immediately and then takes a while to
complete AND if I'm correct in saying the PHP finishes before the generated
page is sent to the browser then it's unlikely to be a slow PHP script
that's the problem.

Hope this helps,
Derek




- Original Message -
From: Daniel Alsén [EMAIL PROTECTED]
To: Derek Mailer [EMAIL PROTECTED]
Sent: Thursday, October 25, 2001 11:45 AM
Subject: RE: [PHP] Re: Loading message


  Is your script really taking that long to be parsed that you need
  a loading
  progress bar or is the html (including graphics etc) just very big?

 Parts of the page is rather heavy loaded. The main php file loads fine and
 displays it´s contents until it reaches one of the heavy includes (heavy
 because it gets data from another website).
 So, in effect, the page loads and displays all content, make pauses when
 hitting heavy includes, and then continues.

 - Daniel




**
This e-mail (and any attachment) is intended only for the attention
of the addressee(s). Its unauthorised use, disclosure, storage
or copying is not permitted. If you are not the intended recipient,
please destroy all copies and inform the sender by return e-mail. 
This e-mail (whether you are the sender or the recipient) may be 
monitored, recorded and retained by Business Information 
Publications Limited (BiP). E-mail monitoring/ blocking software 
may be used, and e-mail content may be read at any time.You 
have a responsibility to ensure laws are not broken when composing 
or forwarding e-mails and their contents.
**


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

2001-10-25 Thread Derek Mailer

go to http://www.php.net/manual/en/ref.filesystem.php and read up on things
like fopen, fclose, etc.  This will explain how to write to any kind of file
including htpasswd files if necessary.

Good Luck
Derek

- Original Message -
From: Gary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 25, 2001 3:59 PM
Subject: [PHP] htpasswd


 Can php write to a htpasswd file? If it can will someone point me in the
 right direction.

 TIA
 Gary


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




**
This e-mail (and any attachment) is intended only for the attention
of the addressee(s). Its unauthorised use, disclosure, storage
or copying is not permitted. If you are not the intended recipient,
please destroy all copies and inform the sender by return e-mail. 
This e-mail (whether you are the sender or the recipient) may be 
monitored, recorded and retained by Business Information 
Publications Limited (BiP). E-mail monitoring/ blocking software 
may be used, and e-mail content may be read at any time.You 
have a responsibility to ensure laws are not broken when composing 
or forwarding e-mails and their contents.
**


-- 
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] Re: [PHP-DB] LDAP multiple actions in modify?

2001-10-18 Thread Derek Mailer

If this suggestion isn't what you're after then it's probably because I
don't fully understand your problem, but here goes...

if you are simply replacing an old password with a new one in a directory
entry you don't need to delete and then add; instead you would use...

ldap_mod_replace to replace the value of userPasswd for the specified entry.
(see http://www.php.net/manual/en/ref.ldap.php)

If you need to do this for multiple entries you would simply repeat the
process in a loop specifying a different dn and newPasswd each time.

I've got a feeling this isn't going to answer your question.  Post more
information about your problem if this is the case.

Cheers the noo,
Derek

- Original Message -
From: Matt McFarlane [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 18, 2001 2:09 PM
Subject: [PHP-DB] LDAP multiple actions in modify?


 Using jsp I can create an array of multiple actions and pass them to an
ldap
 server as one request.  Is there a way to do this using php.

 Specifically I need to perform a delete action on userPassword where
 value=oldPassword and an add action passing userPassword and
 value=newPassword.  The actions must be contained in a single request
and
 the delete function must specify the old password.

 Thanks.

 Matt McFarlane
 Wheaton College
 [EMAIL PROTECTED]




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




**
This e-mail (and any attachment) is intended only for the attention
of the addressee(s). Its unauthorised use, disclosure, storage
or copying is not permitted. If you are not the intended recipient,
please destroy all copies and inform the sender by return e-mail. 
This e-mail (whether you are the sender or the recipient) may be 
monitored, recorded and retained by Business Information 
Publications Limited (BiP). E-mail monitoring/ blocking software 
may be used, and e-mail content may be read at any time.You 
have a responsibility to ensure laws are not broken when composing 
or forwarding e-mails and their contents.
**


-- 
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 Variables and refresh pages

2001-10-04 Thread Derek Mailer

Karina,

If this is the problem you are getting and you can't find a way around it,
you could start the session on a splash or index page so that when you move
from that first page into the main part of the website, the session has
already been started and all session variables are available.

This is more of a quick-fix than a techncal solution, but it should work.

After experimenting with using session id's to track users I opted for using
cookies.  Not because I was having too many problems with sessions, but more
for the benefits that I could get using cookies in that particular
application.

Cheers the noo,

Derek



- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Karina [EMAIL PROTECTED]
Cc: Derek Mailer [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 5:50 PM
Subject: Re: [PHP] Sessions Variables and refresh pages


 Both of SID and session_id() should return the current session id after
 session_start() has been called.

 -Rasmus

 On Wed, 3 Oct 2001, Karina wrote:

  Yes, it is.
 
  This is exactly the problem. Do you know a way to solution this ?
 
  Thks, Karina
 
  ---
 
 
  I'm not sure I fully understand the problem, but I think I can
  have a guess
  at it based on my past experiences...
 
  if you have a php page that starts a session with
  session_start() and, say
  for example, you then try and echo the session id with
  session_id() it will
  not be displayed on screen until you actually refresh the page
  or move to
  another page that calls the session id.
 
  In other words, the session id seems to be set when the session
  is started,
  but isn't availale to use in your script until the page is
  re-loaded.
 
  This is based on what I can remember from 8 months ago and I
  haven't tested
  it out, but I believe this is the sort of problem being
  described in this
  thread.
 
  Cheers the noo,
 
  Derek
 


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




**
This e-mail (and any attachment) is intended only for the attention
of the addressee(s). Its unauthorised use, disclosure, storage
or copying is not permitted. If you are not the intended recipient,
please destroy all copies and inform the sender by return e-mail. 
This e-mail (whether you are the sender or the recipient) may be 
monitored, recorded and retained by Business Information 
Publications Limited (BiP). E-mail monitoring/ blocking software 
may be used, and e-mail content may be read at any time.You 
have a responsibility to ensure laws are not broken when composing 
or forwarding e-mails and their contents.
**


-- 
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 Variables and refresh pages

2001-10-03 Thread Derek Mailer

I'm not sure I fully understand the problem, but I think I can have a guess
at it based on my past experiences...

if you have a php page that starts a session with session_start() and, say
for example, you then try and echo the session id with session_id() it will
not be displayed on screen until you actually refresh the page or move to
another page that calls the session id.

In other words, the session id seems to be set when the session is started,
but isn't availale to use in your script until the page is re-loaded.

This is based on what I can remember from 8 months ago and I haven't tested
it out, but I believe this is the sort of problem being described in this
thread.

Cheers the noo,

Derek

- Original Message -
From: Karina Gómez Salgado [EMAIL PROTECTED]
To: Rasmus Lerdorf [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 8:18 PM
Subject: Re: [PHP] Sessions Variables and refresh pages


 again with the problem i discovered that the problem is that the reload is
 needed when i use the session variables in the queries, otherwise there
are
 not problem. Even if i only want to display the session variable in the
 result page, i need to do a reload.






 Karina wrote:

  Well, I don't understand it too, i don't know why with normal variables
  there are not problem and with session variables i need to refresh the
  page to see the results after the submit form.
 
  The mechanism is this:
 
  query 1 with parameter   ACCESS FORM ---   results
  only
 session_register(uid) shown with refresh
 session_register(pwd)  (get parameter from
  REQUEST_URI)
 
 
  if i do this:
 
  query 1     (NOT ACCESS)   ---   results with no problem
 
 
  I hope than somebody can give me some ideas... because this is driving
  me crazy..
 
  THks,
  Karina
 
  --
  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]




**
This e-mail (and any attachment) is intended only for the attention
of the addressee(s). Its unauthorised use, disclosure, storage
or copying is not permitted. If you are not the intended recipient,
please destroy all copies and inform the sender by return e-mail. 
This e-mail (whether you are the sender or the recipient) may be 
monitored, recorded and retained by Business Information 
Publications Limited (BiP). E-mail monitoring/ blocking software 
may be used, and e-mail content may be read at any time.You 
have a responsibility to ensure laws are not broken when composing 
or forwarding e-mails and their contents.
**


-- 
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] Building Dynamic Value list using ohp

2001-09-26 Thread Derek Mailer

A couple of things about the code...

1) -

mysql_connect ('localhost', 'root', 'monty');

should be

$mysql_link = mysql_connect ('localhost', 'root', 'monty');

2) -


You only pass

you can read more about it all and copy and adapt the code snippter from

http://www.php.net/manual/en/ref.mysql.php

- Original Message -
From: George Pitcher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, September 26, 2001 2:54 PM
Subject: Re: [PHP] Building Dynamic Value list using ohp


 Thanks Gottfried, but that doesn't change the response I get.

 Any more suggestions.

 George P in Edinburgh

 PS I am hoping to come over to Frankfurt for the conference in November
 (boss might pay)

 - Original Message -
 From: [EMAIL PROTECTED]
 To: George Pitcher [EMAIL PROTECTED]
 Sent: Wednesday, September 26, 2001 2:46 PM
 Subject: Re: [PHP] Building Dynamic Value list using ohp


  hi!
 
  try:
 
  $query = select HEI from heronuser; // line 22
 
  greetinx!
  gottfried
 
   Hi all,
  
   I'm having a problem with dynamically building a value list.
  
   My code:
  
   ?php
   mysql_connect ('localhost', 'root', 'monty');
   mysql_select_db ('Heronsql');
  $query = (select HEI from heronuser); // LINE 22 on original
script
  $result = mysql_query($query, $mysql_link);
if(mysql_num_rows($result)) {
  // show all HEIs as options in select form
  while($row = mysql_fetch_row($result))
  {
 print(option value=\$row[0]\$row[0]/option);
  }
}
   ?
  
   But this generates:
  
   Parse error:  parse error in c:\program files\apache
   group\apache\htdocs\bizflyers\login.php on line 22
  
   Any suggestions?
  
   Regards
  
   George
  
  
   _
   Do You Yahoo!?
   Get your free @yahoo.com address at http://mail.yahoo.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]
  
 
  --
  GMX - Die Kommunikationsplattform im Internet.
  http://www.gmx.net


 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.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]




**
This e-mail (and any attachment) is intended only for the attention
of the addressee(s). Its unauthorised use, disclosure, storage
or copying is not permitted. If you are not the intended recipient,
please destroy all copies and inform the sender by return e-mail. 
This e-mail (whether you are the sender or the recipient) may be 
monitored, recorded and retained by Business Information 
Publications Limited (BiP). E-mail monitoring/ blocking software 
may be used, and e-mail content may be read at any time.You 
have a responsibility to ensure laws are not broken when composing 
or forwarding e-mails and their contents.
**


-- 
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] Building Dynamic Value list using ohp

2001-09-26 Thread Derek Mailer

oops...I was going to add...

2) -

$result = mysql_query($query, $mysql_link);

doesn't require the $mysql_link argument, try

$result = mysql_query($query);

Another general comment is that you have copied a bit of your code that
seems to include the root password to mysql.  Not a good idea - you should
check and edit your code if necessary before posting.

Hope this helps - good luck

Derek

- Original Message -
From: George Pitcher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, September 26, 2001 2:54 PM
Subject: Re: [PHP] Building Dynamic Value list using ohp


 Thanks Gottfried, but that doesn't change the response I get.

 Any more suggestions.

 George P in Edinburgh

 PS I am hoping to come over to Frankfurt for the conference in November
 (boss might pay)

 - Original Message -
 From: [EMAIL PROTECTED]
 To: George Pitcher [EMAIL PROTECTED]
 Sent: Wednesday, September 26, 2001 2:46 PM
 Subject: Re: [PHP] Building Dynamic Value list using ohp


  hi!
 
  try:
 
  $query = select HEI from heronuser; // line 22
 
  greetinx!
  gottfried
 
   Hi all,
  
   I'm having a problem with dynamically building a value list.
  
   My code:
  
   ?php
   mysql_connect ('localhost', 'root', 'monty');
   mysql_select_db ('Heronsql');
  $query = (select HEI from heronuser); // LINE 22 on original
script
  $result = mysql_query($query, $mysql_link);
if(mysql_num_rows($result)) {
  // show all HEIs as options in select form
  while($row = mysql_fetch_row($result))
  {
 print(option value=\$row[0]\$row[0]/option);
  }
}
   ?
  
   But this generates:
  
   Parse error:  parse error in c:\program files\apache
   group\apache\htdocs\bizflyers\login.php on line 22
  
   Any suggestions?
  
   Regards
  
   George
  
  
   _
   Do You Yahoo!?
   Get your free @yahoo.com address at http://mail.yahoo.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]
  
 
  --
  GMX - Die Kommunikationsplattform im Internet.
  http://www.gmx.net


 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.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]




**
This e-mail (and any attachment) is intended only for the attention
of the addressee(s). Its unauthorised use, disclosure, storage
or copying is not permitted. If you are not the intended recipient,
please destroy all copies and inform the sender by return e-mail. 
This e-mail (whether you are the sender or the recipient) may be 
monitored, recorded and retained by Business Information 
Publications Limited (BiP). E-mail monitoring/ blocking software 
may be used, and e-mail content may be read at any time.You 
have a responsibility to ensure laws are not broken when composing 
or forwarding e-mails and their contents.
**


-- 
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] Building Dynamic Value list using ohp

2001-09-26 Thread Derek Mailer

what's the error you're getting now?

if you aren't getting any error, but it just isn't working try something
like...(note that I haven't tested this code).

 $drop_down_list = select name=\select\;

$link = mysql_connect ('localhost', '', '')
or die (Could not select db);
mysql_select_db ('Heronsql')
or die (Could not connect);
$query=select distinct HEI from heronuser;
$result = mysql_query ($query);
$num = mysql_num_rows($result);
for ($i = 0; $i  $num; $i++) {
$HEI = mysql_result($result, $i, HEI);
$drop_down_list .= option value=\$HEI\$HEI/option;
}
mysql_close($link);

$drop_down_list .= /select;

echo $drop_down_list;


Cheers the noo,

Derek

- Original Message -
From: George Pitcher [EMAIL PROTECTED]
To: Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, September 26, 2001 3:42 PM
Subject: Re: [PHP] Building Dynamic Value list using ohp


 Thanks for everyone's help but this is still failing to work.

 Revised code is:

 ?php
 $link = mysql_connect ('localhost', '', '')
or die (Could not select db);
 mysql_select_db ('Heronsql')
or die (Could not connect);
 $query=select distinct HEI from heronuser;
$result = mysql_query ($query); // I've also tried with ($query, $link)
  if(mysql_num_rows($result)) {
// show all HEIs as options in select form
while($row = mysql_fetch_row($result))
{
   print(option value=\{$row[0]}\{$row[0]}/option);
}
  }
 mysql_close($link);
 ?

 Any more suggestions (please)?

 George
 - Original Message -
 From: Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED]
 To: 'George Pitcher' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, September 26, 2001 3:17 PM
 Subject: RE: [PHP] Building Dynamic Value list using ohp



 1. this:
 print(option value=\$row[0]\$row[0]/option);
  should be this:
 print(option value=\{$row[0]}\{$row[0]}/option);
  or like this:
 echo 'option value='.$row[0].''.$row[0].'/option');

 The reason for it is that within double quote you can parse for 'simple'
 variables only (es: $var, not $var[]). Otherwise it gives you a parse
 error.

 2. this:
 mysql_connect ('localhost', 'root', 'monty');
  better be this:
 mysql_connect ('localhost', '', ''); // for security
 reasons obviously, you don't wanna give the password our to the group,
 even so it is your local server (you might not be original with the
 password on production machines, no?)


 Hope it helps,
 Maxim Maletsky

 PHPBeginner.com




 -Original Message-
 From: George Pitcher [mailto:[EMAIL PROTECTED]]
 Sent: mercoledì 26 settembre 2001 15.31
 To: [EMAIL PROTECTED]
 Subject: [PHP] Building Dynamic Value list using ohp


 Hi all,

 I'm having a problem with dynamically building a value list.

 My code:

 ?php
 mysql_connect ('localhost', 'root', 'monty');
 mysql_select_db ('Heronsql');
$query = (select HEI from heronuser); // LINE 22 on original script
$result = mysql_query($query, $mysql_link);
  if(mysql_num_rows($result)) {
// show all HEIs as options in select form
while($row = mysql_fetch_row($result))
{
   print(option value=\$row[0]\$row[0]/option);
}
  }
 ?

 But this generates:

 Parse error:  parse error in c:\program files\apache
 group\apache\htdocs\bizflyers\login.php on line 22

 Any suggestions?

 Regards

 George



 _

 Do You Yahoo!?

 Get your free @yahoo.com address at http://mail.yahoo.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]


 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.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]




**
This e-mail (and any attachment) is intended only for the attention
of the addressee(s). Its unauthorised use, disclosure, storage
or copying is not permitted. If you are not the intended recipient,
please destroy all copies and inform the sender by return e-mail. 
This e-mail (whether you are the sender or the recipient) may be 
monitored, recorded and retained by Business Information 
Publications Limited (BiP). E-mail monitoring/ blocking software 
may be used, and e-mail content may be read at any time.You 
have a responsibility to ensure

[PHP] Re: eregi_replace problem

2001-09-22 Thread Derek Truong

Hmm... It works for me?

$welcome_html = hihih [i]hihih[ei] gogogog[c]brfdsfdsf[ec];
$welcome_html = eregi_replace(\[i],I,$welcome_html);
$welcome_html = eregi_replace(\[ei],/I,$welcome_html);
$welcome_html = eregi_replace(\[c],center,$welcome_html);
$welcome_html = eregi_replace(\[ec],/center,$welcome_html);
echo $welcome_html;

Regards,
Derek Truong
IntenseHost.com LLChttp://www.intensehost.com


Daniel Goldin [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 The following does what it's meant to do: replace [i} and [ei} with the
html
 eqivalenets.

 $welcome_html = eregi_replace(\[i],I,$welcome_html);
 $welcome_html = eregi_replace(\[ei],/I,$welcome_html);

 Why does the following NOT work?

 $welcome_html = eregi_replace(\[c],center,$welcome_html);
 $welcome_html = eregi_replace(\[ec],/center,$welcome_html);

 Any help gratefully appreciated.

 

 Daniel Goldin   [EMAIL PROTECTED]
 Creative Director   323.225.1926

  BlueLamp Productions
www.blue-lamp.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] can you prompt for variables in command-line CGI?

2001-08-26 Thread Derek Sivers

for a SHELL SCRIPT using php binary:

in bash I would do this:

#!/bin/bash
echo -n username: 
read username
echo -n password: 
read password
echo $username
echo $password

Run on the command-line, it would stop and ask me for the username and 
password, then continue the bash shell script.

But in PHP, how would I prompt someone at the command-line for input?


-- 
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] What would you want in a PHP web host?

2001-08-01 Thread Derek Del Conte

I have been developing PHP for a while now, and I am wondering how other
developers find their PHP hosting company.  So far this has not been an
issue for me because I am always in full control of my servers (well, as
much control as possible with any web server :), but recently we have begun
to host other PHP sites.

We want to make sure that we are providing appropriate support to our PHP
developers.  I see too many hosting companies saying that they support PHP,
but not having anyone familiar with PHP on hand.  We want to have actual
support, a developer to call when you have a PHP issue.


What do you think a medium sized hosting company could do to give you (the
developer) better service and support?

Is access to professional PHP developers useful when an issue arises?

Are hosting companies reluctant to give you more access rights?

Are they willing to re-compile their PHP build to add other options?

How long do requested changes to the server take?

What other suggestions do you have for improving the relationship between
the server administrator and the PHP developer?


I spent some time going through the PHP site looking at the list of hosts
supporting PHP, but I didn't find any real discussion about what people want
in a host (although I did find plenty of things they don't want :).

I just figured that I would ask the PHP community exactly what they wanted.
Thank you for any insight that you can give me.

--derek


Derek Del Conte [EMAIL PROTECTED]
Gambit Design Internet Services
610.444.2443 610.368.9845 cellular
110 East State Street, Suite 18, Kennett Square, PA 19348


-- 
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 handle LDAP referrals

2001-07-24 Thread Derek

I have 2 machines running OpenLDAP, one as a master directory and the other
as a slave.  I have the master directory replicating to the slave machine
and the slave machine is set up to refer the master url back to the client
when the client attepts to update the slave.

The machines seem to be doing their bit, but how do I get my PHP scripts to
follow the referral sent back from the slave?

The ldap_errno returned is 9 and I could, perhaps, get the script to take
action based in that, but how would I grab the referred URL.  I could, of
course, just make sure that the script points to the master directory, but I
wondered if there are any other choices avaiable to me.

Thanks in advance for any help offered.

Derek



-- 
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] Compiling PHP4.04 with PEAR - PROBLEM!

2001-07-18 Thread Derek Truong

While trying to recompile php with PEAR, I came across this error..

Making install in pear
make[1]: Entering directory
`/home/detain/Apachetoolbox-1.5.33/src/php-4.0.6/pear'
make[2]: Entering directory
`/home/detain/Apachetoolbox-1.5.33/src/php-4.0.6/pear'
shtool:mkdir:Error: invalid number of arguments (at least 1 expected)
shtool:mkdir:Hint:  run
`/home/detain/Apachetoolbox-1.5.33/src/php-4.0.6/build/shtool mkdir -h' or
`man shtool' for details
+--+
| The installation process is incomplete. The following resources were |
| not installed:   |
|  |
|   Self-contained Extension Support   |
|   PEAR: PHP Extension and Add-on Repository  |
|  |
| To install these components, become the superuser and execute:   |
|  |
|   # make install-su  |
+--+
make[2]: *** [install-data-local] Error 5
make[2]: Leaving directory
`/home/detain/Apachetoolbox-1.5.33/src/php-4.0.6/pear'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory
`/home/detain/Apachetoolbox-1.5.33/src/php-4.0.6/pear'
make: *** [install-recursive] Error 1
root@degree [/home/detain/Apachetoolbox-1.5.33/src/php-4.0.6]#

I dunno why it's not installing and asking me to su as a superuser and run
make install-su..
I am root! =P .. I tried removing the whole php-4.0.6 directory and untar it
to compile fresh.. but still getting this error.

My compile string is:
./configure  --prefix=/usr/local --with-apache=/home/detain/Apachetoolbox-1.
5.33/apache_1.3.20 --with-pear --with-mcrypt --with-dom --with-pcre --enable
-exif --enable-track-vars --with-calendar=shared --enable-safe-mode --enable
-magic-quotes --enable-trans-sid --enable-wddx --enable-ftp --with-gd --enab
le-gd-native-ttf --with-t1lib=/usr/local/lib/php/t1libs --with-jpeg-dir=/hom
e/detain/Apachetoolbox-1.5.33/src/jpeg-6b --with-png-dir=/home/detain/Apache
toolbox-1.5.33/src/libpng --with-zlib-dir=/home/detain/Apachetoolbox-1.5.33/
src/zlib --with-ttf --with-freetype-dir=/usr --with-mhash --with-openssl --w
ith-curl=/usr/local --enable-sysvshm --with-bcmath --with-mysql=/usr --with-
pgsql




-- 
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] postgres and php

2001-07-13 Thread Derek

anyone know how I force a case insensitive search through a postgres
database.

I've got a search looking for 'something like '%something%' but this won't
find 'SOMETHING'...if you know what I mean!?

Thanks in advance for any help

Derek



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

2001-06-22 Thread Derek

I'm doing some R  D with PHP and OpenLDAP

I managed to get the php function ldap_add to work and I've been using PHP
to add form-submitted information to a directory.

However I decided to include another objectclass (uidObject) and now it
returns with:
error - Object class violation
error number - 65

I can use the ldapadd client and load an ldif file containing exactly the
same info into the directory.

Why won't it work from within PHP

I've included an excerpt from my code, below.  Thanks in advance for any
help.

Derek



$ds=ldap_connect(localhost);
if ($ds) {
$r=ldap_bind($ds, cn=admin,dc=domain,dc=com,mypassword);
$rdn = o=$username,ou=suppliers,ou=customers,dc=domain,dc=com;

$info[userPassword]=$password;
$info[o]=$organisation;
$info[uid]=$username;
$info[objectclass]=organization;
$info[objectclass]=uidObject;

$add=ldap_add($ds, $rdn, $info);
$error = ldap_error($ds);
$errno = ldap_errno($ds);
echo error is $error number $errno;

ldap_close($ds);
} else {
echo could not connect to directoryBR;
}





-- 
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] ldap object class violation with ldap_add in php4.0.4pl1

2001-06-20 Thread Derek

I'm doing some R  D with PHP and OpenLDAP

I managed to get the php function ldap_add to work and I've been using PHP
to add form-submitted information to a directory.

However I decided to include another objectclass (uidObject) and now it
returns with:
error - Object class violation
error number - 65

I can use the ldapadd client and load an ldif file containing exactly the
same info into the directory.

Why won't it work from within PHP

I've included an excerpt from my code, below.  Thanks in advance for any
help.

Derek



 12 $ds=ldap_connect(localhost);
 13 if ($ds) {
 14 $r=ldap_bind($ds, cn=admin,dc=bipcontracts,dc=com,
mypassword);
 15
 16 $rdn =
o=$username,ou=suppliers,ou=customers,dc=bipcontracts,dc=com;
 17 $version = phpversion();
 18 echo $versionbr;
 19 $info[userPassword]=$password;
 20 $info[o]=$organisation;
 21 $info[uid]=$username;
 22 $info[objectclass]=organization;
 23 $info[objectclass]=uidObject;
 24
 25 $add=ldap_add($ds,$rdn, $info);
 26 $error = ldap_error($ds);
 27 $errno = ldap_errno($ds);
 28 echo error is $error number $errno;
 29
 30 ldap_close($ds);



-- 
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] Changing $PHP_AUTH_USER and $PHP_AUTH_PW

2001-05-24 Thread Derek

Changing $PHP_AUTH_USER and $PHP_AUTH_PW

I would like to automatically set these variables without actually prompting
the user to submit a username or password in the authentication window.

It would mean I could mimic cookie functionality in cookie-disabled browsers
to track users, etc.

Is this possible?...and how?

Thanks in advance for any help offered.

Derek



-- 
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] use NEWLY-ASSIGNED SESSION id?

2001-04-05 Thread Derek Sivers

My PHP script (with --trans-sid  enabled)
assigns a session ID for people without cookies.
No big deal, right?


BUT THE BIG QUESTION IS:
Can I immediately know what long string PHP assigned to the session, 
without having to click to a different page first?


I want one single PHP page to

#1 - assign a session

#2 - then use header ("Location: http://someurl.php?PHPSESSID=" . $userid) 
immediately in that same page.


((The reason why would take too long to explain.))


So... HOW COULD I DO THIS?   (without cookies enabled?)




-- 
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 broken when redirected?

2001-03-29 Thread Derek Sivers

I had this same problem and it constantly broke our whole site.
So I tried a different approach and this has been working great:

Instead of ? header ("Location: sometoherpage.php"); ?

Consider:  ? include "someotherpage.php"; ?

It works flawlessly, always, and maintains your session.

Because my site ( a shopping cart/store ) is so dependent on sessions, I 
stopped using redirects and "Location: " functions entirely.

We just use ? include "..." ? now and all sessions work 
wonderfully.  Even without cookies, etc.




-- 
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] Classes and Object Oriented Programming

2001-03-17 Thread Derek Sivers


Is there a good tutorial on Classes?


http://www.zend.com/zend/tut/class-intro.php

That's a really good one.



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

2001-03-15 Thread Derek Sivers


the connection will close when you hit cancel but the PHP
code can continue running if you choose.


Really?!?

How do you choose to have the PHP script continue even if a browser 
leaves/dumps?
I've always wanted to do that.  Didn't know it was possible.



-- 
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] normal for Apache to hang?

2001-03-14 Thread Derek Sivers

Does your Apache hang?
Is that normal?
To have commands sitting for 1-2 minutes?

Using Apache 1.3.17 + PHP 4.0.4pl1 + newest MySQL on a Debian Linux box.

I use PHP for pretty much everything.
So I have Apache set to parse all files as PHP.
But that's never been a problem before.
(This is a new server, therefore new Apache, PHP, MySQL, etc.)

Any ideas?

Check out this "top" report:

53 processes: 52 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  0.2% user,  0.7% system,  0.0% nice, 99.0% idle
Mem:  512452K av, 503160K used,   9292K free,  0K shrd,   7260K buff
Swap: 979956K av,  0K used, 979956K free372228K cached

   PID USER PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
[[ snip some other processes here ]]
12345 www9   0  4648 4648  2240 S   0  0.0  0.9   1:05 httpd
12346 www9   0  4792 4792  2244 S   0  0.0  0.9   1:12 httpd
12347 www9   0  4600 4600  2240 S   0  0.0  0.8   1:08 httpd
12348 www9   0  4964 4964  2240 S   0  0.0  0.9   1:08 httpd
12349 www   10   0  4912 4912  2292 S   0  0.0  0.9   1:08 httpd
12352 www9   0  4868 4868  2248 S   0  0.0  0.9   1:04 httpd
12358 www9   0  4736 4736  2248 S   0  0.0  0.9   1:05 httpd
12359 www9   0  4744 4744  2240 S   0  0.0  0.9   1:09 httpd
12360 www9   0  5036 5036  2428 S   0  0.0  0.9   1:10 httpd
12361 www9   0  4656 4656  2248 S   0  0.0  0.9   1:12 httpd
12377 mysql  9   0  6624 6624  2076 S   0  0.0  1.2   0:04 mysqld
12378 mysql  9   0  6624 6624  2076 S   0  0.0  1.2   0:05 mysqld


Whaddya think?


-- 
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] Sending pretty email

2001-03-11 Thread Derek Sivers

At 07:49 AM 3/11/01 , Richard Scott Crawford wrote:
The first thing to do is to take two aspirin and lie down until the 
temptation to do this passes.  It may be cool, but those of us who use 
Eudora or Pine for our e-mail don't read HTML-encoded mail, don't *want* 
to read HTML-encoded mail, and get really annoyed when it shows up in our 
mailboxes.

I generally agree, but there is...
ONE GOOD USE FOR HTML EMAIL:   AOL DUMMIES.

REASON:
When I would send my email list a URL I needed them to go to, I would do it 
in plain-text.   ("Go to www.something.com and do something.")

And because 90% of the email programs out there automatically make it a 
hyperlinked URL, there was no problem - *EXCEPT* the AOL people who would 
email back stupid things like, "Sounds interesting!  What's the web address?"

SOLUTION:
When you're sending email using PHP, try this:

if (strtolower(strstr($email, '@'))=="aol.com")
   {
   $link1 = 'a href="http://www.something.com/"www.something.com/a';
   $link2 = 'a href="http://www.otherthing.com/"www.otherthing.com/a';
   }
else
   {
   $link1 = 'www.something.com';
   $link2 = 'www.otherthing.com';
   }

$message = "Hey $firstname -

Check out this link!
" . $link1 . "

and also this one...
" . $link2 . "

Enoy!";

mail ($email, $subject, $message, $headers);


That way the AOL dummies get their hyperlinked HTML links, and all the cool 
people of the world get the regular simple 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] spidering dynamic pages

2001-03-11 Thread Derek Sivers


if I move everything to php and just use a different text file for each
page for the main body of text and load each text file depending on what
page the user wants, would the search engine search though those text
files and just link to those and not to the php file?  Would it even be
spidered by the search enging properly?


Many search engines will NOT spider pages that have "?" or "" in the URL.

But they WILL spider PHP pages as if they were static content IF you hack 
Apache or PHP to let "/" be the variable separator instead of "?"

There are different ways of doing this.  Search the PHP list archives or 
check out some recent PHP books.

But here's the effect you're shooting for:

INSTEAD OF:
http://www.yoursite.com/showarticle.php?id=3article=8language=en

YOU CAN MAKE IT:
http://www.yoursite.com/showarticle/id/3/article/8/language/en

OR EVEN:
http://www.yoursite.com/showarticle/3/8/en

OR:
http://www.yoursite.com/somepage/en/3/8.html
... and just have PHP ignore any ".*" URL extensions before deciding what 
to take as the variables in the URL.

I do the last example at this site:
http://www.cdbaby.org/
It's a totally dynamic site that has gotten very well-spidered using these 
methods.


THE APACHE HACK:
You can either use "mod_rewrite" or in your Apache "/conf/httpd.conf" file, 
set:

DefaultType application/x-httpd-php  --- not sure of exact spelling

So that ALL files with no extension are parsed as PHP files.
Which lets you rename "showarticle.php" to just "showarticle" in the 
examples above.


Hope this made sense.
I'd give concrete code examples but I'm offline right now.


-- 
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] How to protect my scripts ???

2001-03-10 Thread Derek Sivers


Can't the files be put into a directory that Apache has access to and
the users don't, and just ask the users to include them? Or put them
into a global prepend in a directory same as above?


This isn't PERFECT, but I do this:

#1 - make a user/group called "www"

#2 - Set Apache to run as that user.

#3 - chmod all web-directories to 700 permission  (chown www:www -R *; 
chmod 700 -R *) - so that ONLY "www" can read/write them.

#4 - log in as "www" user when you're uploading files to your webserver.



-- 
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] Sending pretty email

2001-03-10 Thread Derek Sivers


I often receive email from commercial sites (e.g. ZDnet) that looks like
a Web page.  How can I do that with Sendmail in PHP?


The man page for "mail" gives an example of it.

http://www.php.net/mail

It's just one "$header" line, stating HTML, then the rest of your message 
should be in HTML:

htmlbody
h1Hello Todd!/h1
pThank you for your can of worms./p


Of course I recommend spacing out your HTML so that people without HTML 
capabilities can still make good sense of it.



-- 
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] payment - the death of CyberCash

2001-03-09 Thread Derek Sivers

Everyone so far has been recommending ClearCommerce:

http://www.clearcommerce.com/

Since my site is 100% PHP and depends on CyberCash for sales, I'll let 
everyone here know what I find out about getting PHP to work with 
ClearCommerce or anyone else.



-- 
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] include() require()

2001-03-07 Thread Derek Sivers


Which is the main difference between include() and
require() functions?


"include" is optional
you can put it inside an "IF"
like this:

if (0)
   {
   /* THIS WILL NOT SHOW... */
   include "optional_file.php";
   }


but "require" happens every time,
even if it is inside an "IF" that does not happen.

if (0)
   {
   /* THIS WILL SHOW ANYWAY... */
   require "optional_file.php";
   }


Me personally,
I use "require" to include functions, libraries, classes that I NEED to run 
the page.
Then I use "include" for optional things, based on "if".


?
require "functions.inc";

if ($sunny_day)
   {
   include "sunny_day_message.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]




Re: [PHP] foo[bar] _or_ foo['bar'] ?

2001-02-13 Thread Derek Sivers


I'd really appreciate a clear statement whether to use better
$foo = array('bar' = 'boing');
 doWhatSoEver($foo[bar]);
or
$foo = array('bar' = 'boing');
 doWhatSoEver($foo['bar']);


I had heard someone on the list say that it's always best to use quotes, 
for the same reason as XHTML, where every value MUST have quotes.

But honestly I've been using only NO-quotes all year and find it much 
easier to read.  And NEVER any problem!

Also makes it easier when you need to use an array variable inside a quoted 
string:

print "Hello there $client[name]";



-- 
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] PARANOID PERMISSIONS for apache?

2001-02-13 Thread Derek Sivers

Can anyone think of any downside to this idea?

Set Apache to run as user/group "www:www"

Set ownership of PHP files and folders to "www:www"
And set permissions to 700
So that ONLY Apache can read them.

Now - even if I give someone shell access to my box, or someone finds my 
personal login password, they still can't read my PHP passwords to MySQL.

(Of course I'd have to be user "www" when uploading changes/files to the 
website.)

Any other paranoid people tried this?
Any downside to it?




-- 
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] Mixing PHP code with phplib templates... possible?

2001-02-06 Thread derek fong

At 11:16 am +0300 2.6.01, Max A. Derkachev wrote:
df I need
df to run all hyperlinks through a function in order to maintain state
df and pass other variables from script to script.  I figure this must
df be possible, but I'm new at using phplib, so I'm not all that clear
df on it...

Set the links as template variables and then substitute them with
values using Template's set_var().

Hi Max,

Thanks for the reply.  Unfortunately, the solution you suggest means 
that I would have to do a set_var on all hyperlinks (i.e., define all 
hyperlinks everywhere on the site), which is a huge amount of 
maintenance.  What I thought about yesterday was creating some sort 
of token (e.g., {@}) that could be tacked onto the end of 
hyperlinks that I want to add session info to.  Maybe there's a 
better way...  I don't know!  :(


---
Derek Fong
web://developer
Zero-Knowledge Systems [http://www.zeroknowledge.com/]

PGP Fingerprint  2D4F 89F0 EAC1 FBFB 97B5  0B94 FA05 C29E D23B 0A4E

-- 
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] Mixing PHP code with phplib templates... possible?

2001-02-05 Thread derek fong

Hi,

Is there a way to embed PHP code in phplib's template files?  I need 
to run all hyperlinks through a function in order to maintain state 
and pass other variables from script to script.  I figure this must 
be possible, but I'm new at using phplib, so I'm not all that clear 
on it...

Any ideas?


---
Derek Fong
web://developer
Zero-Knowledge Systems [http://www.zeroknowledge.com/]

PGP Fingerprint  2D4F 89F0 EAC1 FBFB 97B5  0B94 FA05 C29E D23B 0A4E

-- 
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] HOWTO: Installation on Cobalt RaQ (RaQ3 or RaQ4)

2001-01-24 Thread Derek Sivers

I run about 8 Cobalt RaQ3 and RaQ4 boxes,
and this is the installation procedure that always works for me.
Don't use the Cobalt RPMs.  They're bad  out of date.
-

GET THE SOURCE TARBALLS for MySQL and PHP4

from the command line:
lynx http://mysql.he.net/Downloads/MySQL-3.23/mysql-3.23.32.tar.gz

Then D - download, and enter to save to disk.
That's the newest source tarball from a fast mirror site.
To untar it, do this:
tar -xvfz mysql-3.23.32.tar.gz

Do the same for the newest PHP at
lynx http://www.php.net/do_download.php?download_file=php-4.0.4pl1.tar.gz



HOW TO SET UP A NEW RAQ SERVER:

 TO MAKE MySQL:
## - FIRST: TO MAKE A USER NAME 'mysql' GROUP NAME 'mysql' TO SAFELY RUN 
MYSQL UNDER
/usr/sbin/groupadd mysql
/usr/sbin/useradd mysql -g mysql


./configure  --prefix=/usr/local/mysql-3.23 --with-mysqld-user=mysql --with-lz
make
make install



## - MAKE A "SYMLINK" SO THAT NO MATTER WHAT VERSION OF MYSQL WE'RE ON, 
IT'LL ALWAYS BE AT /USR/LOCAL/MYSQL
cd /usr/local
ln -s mysql-3.23.28 mysql

## - SET THE DATA DIRECTORY TO BE /VAR/DB - MAKE A SYMLINK FOR IT HERE IN 
THE MYSQL FOLDER
cd mysql
ln -s /var/db var

## - INSTALL THE BASIC DATABASE NEEDED TO RUN
bin/mysql_install_db
## - if there's a problem, do the next step then come back and do this step 
again.

## - GO SET PERMISSIONS FOR THE DATA DIRECTORY
cd /var
chown mysql:mysql -R db
chmod 700 -R db


## - COPY THE STARTUP/INIT/CONFIG FILES TO THE RIGHT PLACE
cd share/mysql
cp mysql.server /etc/rc.d/init.d/
cp my-small.cnf /var/db/my.cnf

## - PUT STARTUP FILES IN EVERY STARTUP FOLDER - so if they reboot the 
server, MySQL starts!
cd /etc/rc.d/init.d/
chmod 755 mysql.server
cd ../rc3.d
ln -s ../init.d/mysql.server S88mysql
cd ../rc4.d
ln -s ../init.d/mysql.server S88mysql
cd ../rc6.d
ln -s ../init.d/mysql.server K18mysql
cd ../rc0.d
ln -s ../init.d/mysql.server K18mysql


## - SYMLINK THE COMMANDS INTO THE PATH SO WE CAN JUST TYPE "mysql" FROM 
ANYWHERE
cd /usr/bin
ln -s /usr/local/mysql/bin/* ./
cd /usr/sbin
ln -s /usr/local/mysql/bin/* ./


## - START IT!
safe_mysqld 
mysqladmin -u root -p password 'somesecretpassword'
mysql -u root -p
use mysql;
delete from user where user='';
exit;

from now on, connect to mysql with 'mysql -u root -p' then type the magic 
password afterwards.




 TO MAKE PHP4:

## - weird little bug workaround - was looking in wrong directory for Apache
cd /usr/bin
ln -s /usr/sbin/httpd httpd

## - GO BACK TO THE PHP4 INSTALLATION 
DIRECTORY  (/home/sites/home/users/admin/software/php4.0.3/)
./configure --with-apxs=/usr/sbin/apxs --with-mysql=/usr/local/mysql 
--enable-track-vars --enable-trans-sid --enable-ftp

make

make install


vi php.ini-dist

 ## - CHANGE THESE LINES:

  under [mail function]
 sendmail_path   = /usr/sbin/sendmail -t -i


## COPY THE CONFIGURATION FILE TO WHERE PHP LOOKS FOR IT
cp php.ini-dist /usr/local/lib/php.ini


## WE HAVE TO ADD MySQL TO THE LIBRARY PATH
vi /etc/ld.so.conf
 ## - ADD THESE LINES AT THE END;
 /usr/local/mysql/lib/mysql

/sbin/ldconfig



## MAKE APACHE PHP-READY:

vi /etc/httpd/conf/srm.conf

find this line:
DirectoryIndex index.html index.htm  etc
and add the 2 more options:   index.php index.php3

find the line talking about PHP:
change it from "php3" to just:

AddType application/x-httpd-php .php .php3 .htm .html


## READY TO RESTART APACHE:

go into /etc/httpd/conf/httpd.conf

and IF there is a line that reads this:
LoadModule php4_modulelib/apache/libphp4.so

amend it to read this:
LoadModule php4_module/usr/lib/apache/libphp4.so

then restart httpd:
/etc/rc.d/init.d/httpd restart



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