[PHP] Search metatag script

2003-02-12 Thread Vicki
I'm pretty new to PHP and have no programming background, so I wanted to ask what 
would be the best 
way to approach this script. A client will develop a set of keywords which we will 
post on a Keyword 
Index page (probably 50+). He will then designate which of 25 product pages to apply 
these keywords 
to, and the relevant ones will be placed in the keywords metatag (no other words will 
be included 
there). The script I want to write will search only the keywords metatag and will 
return a list of 
links to the relevant pages. Sounds simple enough, right? I tried some free scripts 
that would 
search the whole site, but customizing them for this function seemed like reinventing 
the wheel (and 
a rather complex wheel at that).

Does this sound like something a newbie could do? If so, any general guidelines/advice 
would be 
greatly appreciated.

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




[PHP] Newbie ? on sessions

2002-06-13 Thread Vicki

I'm very new to PHP/mySQL so please forgive me if this is a silly 
question. I'm mostly trying to understand the concepts involved in 
tracking user activity with sessions, and despite hours of reading I'm 
still confused.

I have a membership site with users authenticated by a mySQL database. I 
have incorporated sessions into the login script which passes the 
session variables to a page restricted to members-only that contains 
links to articles. 

Here's the question: If a member logs out (session_destroy()) or closes 
the browser, the session data is gone, right? How, then, would I go 
about storing information about the member's activity on the site? The 
next time they log in, I'd like to greet them with a message that says 
"Hi, $username. You last visited the site on $date and you viewed the 
following articles: $article1, $article2."

Do I need to store the sessionid in the database and register more 
variables to track the activity, or should I write a separate script 
that stores details of their activity, perhaps as a separate table in 
the database? What I really don't understand is whether this sort of 
tracking is done with sessions or by writing to a database. (OK that's 
more than one question.)

Also, if I do need to store the session ID in the database and I don't 
have access to the php.ini file, is there a way to set the 
session_save_handler to user through .htaccess or some other means?

Thanks very much for any help you can provide.

Vicki

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




Re: [PHP] Newbie ? on sessions

2002-06-13 Thread Vicki

Thanks for both of your comments. I don't know why I was getting all 
tangled up in sessions, but now I feel MUCH more confident about how to 
proceed.

Best regards,
Vicki

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




[PHP] How to remove item from cart

2002-06-23 Thread Vicki

I have a shopping cart where users have added a list of documents for 
purchase. I want to allow users to remove documents from the cart before 
checkout. There are no quantities involved-- this is a "yes I want 
$docID" or "no I don't" situation.

I thought the easiest way might be to have a checked checkbox before 
each item (. . . name=checkbox value=true checked) with instructions to 
uncheck the box and click on a "save changes" button to refresh the 
cart. I've spent many hours trying to get this scheme to work. Before I 
spend more time beating my head against the same 'ol wall, I thought I'd 
ask those more knowledgeable if a checkbox is the best method of 
achieving this. If so, this is the code I tried to use (the $save 
variable is passed as a hidden form field, $cart is an array and a  
registered session variable)

if($save)
 { 
   if($checkbox != true)
  unset($cart[$docID]);
   
 else 
   $cart[$docID] = $$docID;
   
}

(I should say this is the latest version. I've tried lots of way, but 
none have worked. I've tried "foreach" in lots of ways, but I may not 
understand this construct properly. For example I've tried:

if($save)
 { 
   foreach ($cart as $docID => $checkbox)
   {
   if($checkbox != true)
  unset($cart[$docID]);
   
 else 
   $cart[$docID] = $$docID;
   }
)

If you can suggest code that works, that would be great, or at least 
point me in the right direction if I'm on the wrong track with 
checkboxes. If you haven't noticed already, I'm very, very new to PHP 
and haven't quite got the hang of it yet. :=)

Thanks, Vicki

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




[PHP] More on removing item from cart

2002-06-25 Thread Vicki

I posted a question about this a couple days ago. Many thanks to Dan and 
Erik for your suggestions, which I've thoroughly investigated. 
Unfortunately, I still have not got the problem resolved, and I've been 
working on it for so long that I think my brain may be permanently 
scrambled. I do, however, have a strong suspicion about  where one part 
of the problem may lie, and would appreciate some clarification on this 
issue.

I have a shopping cart array $cart, with $artID as its key ($artID is an 
integer). $cart is set as a session variable. The cart prints to the 
browser with checkboxes next to each article and instructions to uncheck 
the checkbox and click on the "Save Changes" button to remove items from 
the cart. (This is the part that doesn't work.) The checkbox input has 
"NAME = checkbox[$artID] VALUE = yes", and there is a hidden input with  
"NAME = save VALUE = true" that are passed when the form is submitted.

My suspicion is that my problems are caused by the fact that I'm trying 
to relate two arrays - $cart and $checkbox. They do have the same key 
($artID), but I haven't been able to find any way to get them to work 
together. All I want this piece of code to do is return a $cart that 
doesn't include any articles ($artID) that weren't checked. I've tried 
dozens of variations, but now I think most of them have been reading 
from one or the other array and therefore failed.

If anybody has any suggestions on this I'd be very grateful. I've been 
working on this for days (I'm very new to PHP), and it just doesn't seem 
like it should be that difficult.

Thanks, Vicki

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




Re: [PHP] More on removing item from cart

2002-06-26 Thread Vicki

Dan:

Thanks very much for the detailed reply. I took most of this code from Welling and 
Thomson's book 
"PHP and MySQL Development," (chpt. 25) but I'm trying to modify it to fit my 
purposes. The html is 
mostly theirs, and it's not the way I would write it, but it's working on my test 
machine. I plan to 
clean it up and do cross-browser testing once the scripts work. 

I agree completely that the problem is most likely in the foreach line of the 
following code. 

if($save)
   {
 foreach($cart as $artID => $value)
  
{
  if(empty($value))
unset($cart[$artID]);

  else 
$cart[$artID] = $$artID;
}

You asked about the structure of the cart, and here's another problem area. One of the 
greatest 
difficulties I've had learning PHP (my first attempt at any scripting/programming 
language, in case 
you hadn't noticed), is understanding array structures.

The cart is created by the show_cart page when items are added to it. Here's the 
relevant code 
(which immediately precedes the "if($save)" snippet sent in the previous message: 

";
   }

This returns "article ID number (an integer) : 1" when new
and "article ID : yes" after the save button has been clicked. 

I tried naming the checkbox "want[$artID]" but as far as I can tell the $want array 
and the $cart 
array are two separate entities and none of the code I've tried seems to work on both, 
even when 
they have the same key ($artID). For example, when I revised the code you sent earlier 
to

while (list($artID,) = each ($_POST['want']))
  $cart[$artID];

it didn't work. Obviously, something else could be interfering.

Re: the line of code you thought odd and asked about:

else  
   $cart[$artID] = $$artID;

I thought it was odd too, and since this is acquired code, I can't explain it. I 
assumed that it 
just resets the artID to its original value.

I'm afraid this message is way too long, and I apologize if it's too much. I hesitated 
posting 
questions in the first place because the interaction of the code seemed fairly 
complex, but I'm also 
quite desperate.

Once again, many thanks for your patience and attention.

Vicki

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




Re: [PHP] More on removing item from cart

2002-06-28 Thread Vicki

Thanks to Jason and ³Sp² for the tip on ³print_r². After all the books I¹ve read, and 
all the 
scrounging through the manual, I¹m amazed I missed that one. It¹s VERY helpful!

Thanks for your comments Dan. I¹ve actually spent quite some time trying to rework the 
cart because 
I agree that the way it¹s written now is strange. However, I hit a wall trying to 
rework it, and 
decided to go back to the same wall I¹ve been banging my head against all week.

I think you understand most of the process with one clarification. When the user 
unchecks a checkbox 
to remove an article from the cart, they click a ³save² button (which triggers the 
if($save) part of 
the script). The ³checkout² button triggers a separate process that¹s not really 
involved here. The 
show_cart page is only showing the articles added to the cart and refreshing the cart 
when articles 
are removed ­ and of course setting the session variables for the cart.

I¹ve included the information you requested at the bottom of this message, showing the 
contents of 
the $cart and $checkbox arrays at various stages. The relevant code from the show_cart 
page is this:

 if($new)  //new item selected
  {
if(!session_is_registered("cart"))
{
  $cart = array();
  session_register("cart");
  $article_qty = 0;
  session_register("article_qty");
  $total_words = 0;  
  session_register("total_words");
}
   if($cart[$new])
 $cart[$new]++;
else 
  $cart[$new] = "1";

   }
   
  if($save)  //save button clicked
  {
   foreach($cart as $artID => $value)
   {
  if(!isset($yes))
unset($cart[$artID]);
  else 
$cart[$artID] = $$artID;
}
  }

I know the ³foreach² part under if($save) is all wrong. It seems to me that it should 
be possible to 
write some sort of loop that says ³if the artID (key) for an element in the cart array 
doesn¹t match 
an artID in the checkbox array, then unset the element with that artID from the cart 
array.² OR 
³only display those elements in the cart array for which an element exists in the 
checkbox array 
that has the same key.²

I¹ve tried a bunch of different ways to do this with no success. I¹m not even sure you 
can work with 
two arrays in this way in PHP. Couldn¹t you do something like

if ($checkbox[$artID] == $cart[$artID]))
 { then those are the elements that make up the array $cart }

I haven¹t been able to figure this part out. Aargh! Perhaps something is patently 
obvious in this 
code to PHPers. If so, I truly welcome your suggestions, and Dan I really appreciate 
your looking at 
this so closely. 

Exasperated, Vicki

PS when I use print_r to display the contents of the arrays, I see a "1" after the 
array contents. I 
have no idea what that refers to. Any ideas?
___
Here's the code you requested. This is from the View Source window so hopefully you 
can see what's 
going on more clearly.  The first sample is when two new articles have been added to 
the cart. I've 
included the array info and the relevant html.


 Cart Array at top of show_cart page: Array
(
[3] => 1
[1] => 1
)
1
 Checkbox Array at top of show_cart page: 1
 Cart Array after "if($save)": Array
(
[3] => 1
[1] => 2
)
1
 Checkbox Array after "if($save)": 1
//
//
//HTML header info deleted here . . .
//
// 
   Welcome, User!
  
  http://127.0.0.1/ifiosx/checkout.php";>
 

  
  
  

 
 
Article
Word Count
 

Q & A
235
 

The Photos We 
Keep
300
 
    
Number of Articles = 2
   535
 
 

   To remove an article from your order, 
   uncheck the box to the left of the title 
   and click on the "Save Changes" button.

  




___
The arrays after "save" button has been clicked (but checkboxes left checked). The 
keys are the 
correct artID for the articles chosen. 

 Cart Array at top of show_cart page: Array
(
[1] => 1
[3] => 1
)
1

 Checkbox Array at top of show_cart page: Array
(
[1] => yes
[3] => yes
)
1

 Cart Array after "if($save)": Array
(
[1] => 
[3] => 
)
1

 Checkbox Array after "if($save)": Array
(
[1] => yes
[3] => yes
)
1
__
The arrays after the checkbox for the article with artID==3 has been unchecked. This 
results in the 
cart being emptied entirely and the result "There are no items in your cart."

 Cart Array at top of show_cart page: Array
(
[1] => 
[3] => 
)
1

 Ch

[PHP] Newbie ?: why this error?

2001-09-04 Thread Vicki

Not only am I new to PHP, I'm new to programming altogether. I'm trying 
to take it step by step, and my first big experiment was the script 
below, used to enter info from a form into a mySQL database. I get the 
following error message when it runs:

Parse error: parse error, expecting `','' or `';'' in 
/www/ideasforimages/request_sample.php on line 8

I've been stuck on this all afternoon. The opening PHP tag is what's on 
line 8. I've run other simple scripts with the same tag, so it doesn't 
seem to be a problem with the server set-up or application. Any help 
would be greatly appreciated!

Vicki

Here's the the first part of the script in question:



Sample Request Results



Thank you for requesting a sample. Here it is.

"
"Please go back and try again.";
exit;
}

$SampFirstName = addslashes ($SampFirstName);
$SampLastName  = addslashes ($SampLastName) ;
$SampEmail = addslashes ($SampEmail);

 $db = mysql_connect ("hostname", "user", "password");

if (!$db)
{
echo "Error: Could not connect to database. Please try again later.";
exit;
}

-- 
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] Newbie ?: why this error?

2001-09-04 Thread Vicki

Well this is progress! My sloppy semicolons seem to have been the 
problem. The error message has now moved down to line 14, which in 
Dreamweaver 4 is the closing "}" of that code block.

Since the line numbers in the error messages don't seem to be exact, the 
problem is probably in the lines immediately following the code block:

$SampFirstName = addslashes ($SampFirstName);
$SampLastName  = addslashes ($SampLastName) ;
$SampEmail = addslashes ($SampEmail);

 $db = mysql_connect ("hostname", "user", "password");

if (!$db)
{
echo "Error: Could not connect to database. Please try again later.";
exit;
}

I'll start looking at these lines more closely now. Thanks for the help. 
I guess I was taking those error messages too literally and looking for 
the problem in the wrong place.

Vicki


In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Jack Dempsey) wrote:

> Hi Vicki,
> 
> try this:
> 
>  if (!$SampFirstName || !$SampLastName || !$SampEmail)
> {
> echo "You have not entered all the required information. "; #<-- you
> need a semi colon here and
> 
> echo "Please go back and try again."; #<-- another echo here.
> exit;
> }
> 
> you could also do this:
> 
>  if (!$SampFirstName || !$SampLastName || !$SampEmail)
> {
> echo "You have not entered all the required information.  Please go back
> and try again.";
> exit;
> }
> 
> 
> Jack
>

-- 
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] Newbie ?: why this error?

2001-09-05 Thread Vicki

That's good to know. Thanks!

Vicki

 In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Cc Zona) wrote:

> In article <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] (Vicki) wrote:
> 
> >  $db = mysql_connect ("hostname", "user", "password");
> > 
> > if (!$db)
> > {
> > echo "Error: Could not connect to database. Please try again later.";
> > exit;
> > }
> 
> BTW, you can reduce that block down to a single line:
> 
> $db = mysql_connect ("hostname", "user", "password") or die("Error: Could 
> not connect to database. Please try again later.");
> 
> See <http://php.net/die> for more info.

-- 
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] UD4 & PhAkt Users?

2001-09-05 Thread Vicki

I'm trying to learn PHP right now for a subscription-based site that 
requires features such as user authentication and e-commerce (with a 
mySQL database) I'm using Dreamweaver 4 on a Mac running OS 9 to build 
the site. I'm wondering if the learning curve would be less steep if I 
upgraded to UltraDev and installed PhAkt. I understand the logic behind 
the code, but am having a hard time learning all the syntax (and I've 
always been a lousy typist). Would UltraDev help?

Is anybody working with UltraDev and PhAkt now, esp. on a Mac? How's it 
going? Since I can't test locally with my current set-up, I also wonder 
whether I can set up remote connections to my hosting company's servers 
(and whether that's a pain to do) or if just uploading files and testing 
that way is a viable alternative. 

My goal is to get the site up as quickly as possible. Would UD4 + PhAkt 
speed things up?

Thanks very much for any insight you can provide.

Vicki

-- 
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: UD4 & PhAkt Users?

2001-09-07 Thread Vicki

Thanks for your comments. The advice to just learn the code is both wise 
and simple. To complicate matters, I did download a trial version of 
Ultra Dev, installed PhAkt, found a JDBC driver that would work through 
my Mac to connect to a MySQL database, only to learn that the webhosting 
company won't allow such connections. So until I'm able to set up a 
local testing environment (an expensive and time consuming affair), 
UltraDev isn't an option for me. 

In short, your advice has been supported by my experience.

Best regards,
Vicki

-- 
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 list posting confirmation for vicki.stanfield....@dfas.mil

2010-09-08 Thread STANFIELD, VICKI CTR DFAS
I am trying to build php-5.3.3 and getting the following error: 

/users/0/php-5.3.3/TSRM -I/users/cin05038/php-5.3.3/Zend
-I/usr/local/include -g -O2 -DZTS   -c
/users/0/php-5.3.3/ext/standard/filestat.c -o
ext/standard/filestat.lo 
/users/0/php-5.3.3/ext/standard/filestat.c: In function
`php_do_chgrp':
/users/0/php-5.3.3/ext/standard/filestat.c:416: error: too many
arguments to function `getgrnam_r'
/users/0/php-5.3.3/ext/standard/filestat.c: In function
`php_do_chown':
/users/0/php-5.3.3/ext/standard/filestat.c:517: error: too many
arguments to function `getpwnam_r'
make: *** [ext/standard/filestat.lo] Error 1

I have set my ORACLE_HOME, my PATH, and my LD_LIBRARY_PATH
And used the following configure command:

./configure --prefix=/app/php532 --with-apxs2=/app/apache2215/bin/apxs
--with-zlib --with-zlib-dir=/usr/lib --with-png-dir=/usr/include/libpng
--with-openssl=/shared_ro/openssl_098
--with-oci8=/shared_ro/users.oracle/11.1.0

I have tried the make that came on Solaris 10 and gmake and get the same
error either way. Can anyone give me a hint as to what I am doing wrong
in this build?

  -Vicki Stanfield, RHCE, CISSP
Web Management Group


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



[PHP] Recall: PHP list posting confirmation for vicki.stanfield....@dfas.mil

2010-09-08 Thread STANFIELD, VICKI CTR DFAS
STANFIELD, VICKI CTR DFAS would like to recall the message, "PHP list posting 
confirmation for vicki.stanfield@dfas.mil".

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



RE: [PHP] RE: PHP list posting confirmation for vicki.stanfield....@dfas.mil

2010-09-08 Thread STANFIELD, VICKI CTR DFAS
That was a mistake. My apologies. I meant to change the Subject line
before hitting send.

  -Vicki Stanfield, RHCE, CISSP
Web Management Group
tso-cs-web-t...@dfas.mil

Defense Finance and Accounting Service
Technical Services Organization - Corporate Services
vicki.stanfield@dfas.mil
(317)510-3375

-Original Message-
From: tedd [mailto:tedd.sperl...@gmail.com] 
Sent: Wednesday, September 08, 2010 9:22 AM
To: STANFIELD, VICKI CTR DFAS; php-general@lists.php.net
Subject: [PHP] RE: PHP list posting confirmation for
vicki.stanfield@dfas.mil

At 9:03 AM -0400 9/8/10, STANFIELD, VICKI CTR DFAS wrote:
>I am trying to build php-5.3.3 and getting the following error:


And what does the Subject line say about your problem? Absolutely
nothing!

Please understand that these Q&A's are kept in the archives for 
others to read, review, and resolve their problems.

You will do much better at getting your question answered by 
following normal practices for most all list servers. IOW, briefly 
describe your problem in the subject line and submit your problem.

Cheers,

tedd

-- 
---
http://sperling.com/

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



[PHP] Filestat.c erorrs when building php-5.3.3 on solaris

2010-09-08 Thread STANFIELD, VICKI CTR DFAS
I am trying to build php-5.3.3 and getting the following error: 

/users/0/php-5.3.3/TSRM -I/users/0/php-5.3.3/Zend
-I/usr/local/include -g -O2 -DZTS   -c
/users/0/php-5.3.3/ext/standard/filestat.c -o
ext/standard/filestat.lo 
/users/0/php-5.3.3/ext/standard/filestat.c: In function
`php_do_chgrp':
/users/0/php-5.3.3/ext/standard/filestat.c:416: error: too many
arguments to function `getgrnam_r'
/users/0/php-5.3.3/ext/standard/filestat.c: In function
`php_do_chown':
/users/0/php-5.3.3/ext/standard/filestat.c:517: error: too many
arguments to function `getpwnam_r'
make: *** [ext/standard/filestat.lo] Error 1

I have set my ORACLE_HOME, my PATH, and my LD_LIBRARY_PATH
And used the following configure command:

./configure --prefix=/app/php533 --with-apxs2=/app/apache2215/bin/apxs
--with-zlib --with-zlib-dir=/usr/lib --with-png-dir=/usr/include/libpng
--with-openssl=/shared_ro/openssl_098
--with-oci8=/shared_ro/users.oracle/11.1.0

I am using gmake 3.80. Can anyone give me a hint as to what I am doing
wrong in this build?

  -Vicki Stanfield, RHCE, CISSP

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



RE: [PHP] Filestat.c erorrs when building php-5.3.3 on solaris

2010-09-09 Thread STANFIELD, VICKI CTR DFAS
Ok, I tried removing the --disable-posix and adding --with-tsrm-pthreads
to the configure options. 
The resulting configure looks like this:

CC='/usr/local/bin/gcc' \
'./configure' \
'--prefix=/app/php533' \
'--enable-shared' \
'--with-tsrm-pthreads' \
'--with-gnu-ld' \
'--with-apxs2=/app/apache2216/bin/apxs' \
'--with-zlib' \
'--with-zlib-dir=/usr/lib' \
'--with-png-dir=/usr/include/libpng' \
'--with-openssl=/shared_ro/openssl_098' \
'--with-oci8=/shared_ro/users.oracle/11.1.0'

Now I get this:

/users/0/php-5.3.3/ext/posix/posix.c: In function
`zif_posix_getgrnam':
/users/0/php-5.3.3/ext/posix/posix.c:1017: error: too many arguments
to function `getgrnam_r'
/users/0/php-5.3.3/ext/posix/posix.c: In function
`zif_posix_getgrgid':
/users/0/php-5.3.3/ext/posix/posix.c:1067: error: too many arguments
to function `getgrgid_r'
/users/0/php-5.3.3/ext/posix/posix.c:1067: warning: assignment makes
integer from pointer without a cast
/users/0/php-5.3.3/ext/posix/posix.c: In function
`zif_posix_getpwnam':
/users/0/php-5.3.3/ext/posix/posix.c:1136: error: too many arguments
to function `getpwnam_r'
/users/0/php-5.3.3/ext/posix/posix.c: In function
`zif_posix_getpwuid':
/users/0/php-5.3.3/ext/posix/posix.c:1184: error: too many arguments
to function `getpwuid_r'
/users/0/php-5.3.3/ext/posix/posix.c:1184: warning: assignment makes
integer from pointer without a cast
gmake: *** [ext/posix/posix.lo] Error 1

Do I need to add the -D_POSIX_PTHREAD_SEMANTICS in the makefile or
configure.in somewhere? Can you point me in the right direction?

  -Vicki Stanfield, RHCE, CISSP

-Original Message-
From: Tom Rogers [mailto:trog...@kwikin.com] 
Sent: Wednesday, September 08, 2010 10:06 PM
To: Tom Rogers
Cc: php-general@lists.php.net
Subject: Re: [PHP] Filestat.c erorrs when building php-5.3.3 on solaris

Hi,

Thursday, September 9, 2010, 11:31:06 AM, you wrote:
TR> Hi,

TR> Thursday, September 9, 2010, 2:07:50 AM, you wrote:
SVCD>> I am trying to build php-5.3.3 and getting the following error: 

SVCD>> /users/0/php-5.3.3/TSRM -I/users/0/php-5.3.3/Zend
SVCD>> -I/usr/local/include -g -O2 -DZTS   -c
SVCD>> /users/0/php-5.3.3/ext/standard/filestat.c -o
SVCD>> ext/standard/filestat.lo 
SVCD>> /users/0/php-5.3.3/ext/standard/filestat.c: In function
SVCD>> `php_do_chgrp':
SVCD>> /users/0/php-5.3.3/ext/standard/filestat.c:416: error: too
many
SVCD>> arguments to function `getgrnam_r'
SVCD>> /users/0/php-5.3.3/ext/standard/filestat.c: In function
SVCD>> `php_do_chown':
SVCD>> /users/0/php-5.3.3/ext/standard/filestat.c:517: error: too
many
SVCD>> arguments to function `getpwnam_r'
SVCD>> make: *** [ext/standard/filestat.lo] Error 1

SVCD>> I have set my ORACLE_HOME, my PATH, and my LD_LIBRARY_PATH
SVCD>> And used the following configure command:

SVCD>> ./configure --prefix=/app/php533
--with-apxs2=/app/apache2215/bin/apxs
SVCD>> --with-zlib --with-zlib-dir=/usr/lib
SVCD>> --with-png-dir=/usr/include/libpng
SVCD>> --with-openssl=/shared_ro/openssl_098
SVCD>> --with-oci8=/shared_ro/users.oracle/11.1.0

SVCD>> I am using gmake 3.80. Can anyone give me a hint as to what I am
doing
SVCD>> wrong in this build?

SVCD>>   -Vicki Stanfield, RHCE, CISSP


TR> From   the   error  message  it  would  seem  the  operating
system's
TR> getpwnam_r() function is not POSIX compatible.
TR> What system are you compiling on?

TR> -- 
TR> regards,
TR> Tom



It  would  seem  you  need to add -D_POSIX_PTHREAD_SEMANTICS to the cc
flags to get the right function.

-- 
regards,
Tom


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



RE: [PHP] Filestat.c erorrs when building php-5.3.3 on solaris

2010-09-14 Thread STANFIELD, VICKI CTR DFAS
For the record, the problem appears to have been that the gcc version
was too old. It compiles with gcc 3.4.6 

  -Vicki Stanfield, RHCE, CISSP
Web Management Group
tso-cs-web-t...@dfas.mil

Defense Finance and Accounting Service
Technical Services Organization - Corporate Services
vicki.stanfield@dfas.mil
(317)510-3375

-Original Message-
From: Tom Rogers [mailto:trog...@kwikin.com] 
Sent: Thursday, September 09, 2010 10:05 PM
To: STANFIELD, VICKI CTR DFAS
Cc: php-general@lists.php.net
Subject: Re: [PHP] Filestat.c erorrs when building php-5.3.3 on solaris

Hi,

Friday, September 10, 2010, 2:49:36 AM, you wrote:
SVCD> Ok, I tried removing the --disable-posix and adding
--with-tsrm-pthreads
SVCD> to the configure options. 
SVCD> The resulting configure looks like this:

SVCD> CC='/usr/local/bin/gcc' \
SVCD> './configure' \
SVCD> '--prefix=/app/php533' \
SVCD> '--enable-shared' \
SVCD> '--with-tsrm-pthreads' \
SVCD> '--with-gnu-ld' \
SVCD> '--with-apxs2=/app/apache2216/bin/apxs' \
SVCD> '--with-zlib' \
SVCD> '--with-zlib-dir=/usr/lib' \
SVCD> '--with-png-dir=/usr/include/libpng' \
SVCD> '--with-openssl=/shared_ro/openssl_098' \
SVCD> '--with-oci8=/shared_ro/users.oracle/11.1.0'

SVCD> Now I get this:

SVCD> /users/0/php-5.3.3/ext/posix/posix.c: In function
SVCD> `zif_posix_getgrnam':
SVCD> /users/0/php-5.3.3/ext/posix/posix.c:1017: error: too many
arguments
SVCD> to function `getgrnam_r'
SVCD> /users/0/php-5.3.3/ext/posix/posix.c: In function
SVCD> `zif_posix_getgrgid':
SVCD> /users/0/php-5.3.3/ext/posix/posix.c:1067: error: too many
arguments
SVCD> to function `getgrgid_r'
SVCD> /users/0/php-5.3.3/ext/posix/posix.c:1067: warning: assignment
makes
SVCD> integer from pointer without a cast
SVCD> /users/0/php-5.3.3/ext/posix/posix.c: In function
SVCD> `zif_posix_getpwnam':
SVCD> /users/0/php-5.3.3/ext/posix/posix.c:1136: error: too many
arguments
SVCD> to function `getpwnam_r'
SVCD> /users/0/php-5.3.3/ext/posix/posix.c: In function
SVCD> `zif_posix_getpwuid':
SVCD> /users/0/php-5.3.3/ext/posix/posix.c:1184: error: too many
arguments
SVCD> to function `getpwuid_r'
SVCD> /users/0/php-5.3.3/ext/posix/posix.c:1184: warning: assignment
makes
SVCD> integer from pointer without a cast
SVCD> gmake: *** [ext/posix/posix.lo] Error 1

SVCD> Do I need to add the -D_POSIX_PTHREAD_SEMANTICS in the makefile or
SVCD> configure.in somewhere? Can you point me in the right direction?

SVCD>   -Vicki Stanfield, RHCE, CISSP

SVCD> -Original Message-
SVCD> From: Tom Rogers [mailto:trog...@kwikin.com] 
SVCD> Sent: Wednesday, September 08, 2010 10:06 PM
SVCD> To: Tom Rogers
SVCD> Cc: php-general@lists.php.net
SVCD> Subject: Re: [PHP] Filestat.c erorrs when building php-5.3.3 on
solaris

SVCD> Hi,

SVCD> Thursday, September 9, 2010, 11:31:06 AM, you wrote:
TR>> Hi,

TR>> Thursday, September 9, 2010, 2:07:50 AM, you wrote:
SVCD>>> I am trying to build php-5.3.3 and getting the following error: 

SVCD>>> /users/0/php-5.3.3/TSRM -I/users/0/php-5.3.3/Zend
SVCD>>> -I/usr/local/include -g -O2 -DZTS   -c
SVCD>>> /users/0/php-5.3.3/ext/standard/filestat.c -o
SVCD>>> ext/standard/filestat.lo 
SVCD>>> /users/0/php-5.3.3/ext/standard/filestat.c: In function
SVCD>>> `php_do_chgrp':
SVCD>>> /users/0/php-5.3.3/ext/standard/filestat.c:416: error: too
SVCD> many
SVCD>>> arguments to function `getgrnam_r'
SVCD>>> /users/0/php-5.3.3/ext/standard/filestat.c: In function
SVCD>>> `php_do_chown':
SVCD>>> /users/0/php-5.3.3/ext/standard/filestat.c:517: error: too
SVCD> many
SVCD>>> arguments to function `getpwnam_r'
SVCD>>> make: *** [ext/standard/filestat.lo] Error 1

SVCD>>> I have set my ORACLE_HOME, my PATH, and my LD_LIBRARY_PATH
SVCD>>> And used the following configure command:

SVCD>>> ./configure --prefix=/app/php533
SVCD> --with-apxs2=/app/apache2215/bin/apxs
SVCD>>> --with-zlib --with-zlib-dir=/usr/lib
SVCD>>> --with-png-dir=/usr/include/libpng
SVCD>>> --with-openssl=/shared_ro/openssl_098
SVCD>>> --with-oci8=/shared_ro/users.oracle/11.1.0

SVCD>>> I am using gmake 3.80. Can anyone give me a hint as to what I am
SVCD> doing
SVCD>>> wrong in this build?

SVCD>>>   -Vicki Stanfield, RHCE, CISSP


TR>> From   the   error  message  it  would  seem  the  operating
SVCD> system's
TR>> getpwnam_r() function is not POSIX compatible.
TR>> What system are you compiling on?

TR>> -- 
TR>> regards,
TR>> Tom



SVCD> It  would  seem  you  need to add -D_POSIX_PTHREAD_SEMANTICS to
the cc
SVCD> flags to get the right function.

SVCD> -- 
SVCD> regards,
SVCD> Tom



That  should  get  added  automatically  when  you run configure if it
recognizes that the system is solaris.

Try adding --host=solaris to configure and see if that helps

-- 
regards,
Tom


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