php-general Digest 25 Dec 2001 08:47:14 -0000 Issue 1072

Topics (messages 78683 through 78710):

SNMP with 4.1.0
        78683 by: Peter Hicks
        78692 by: Brian Clark
        78694 by: Peter Hicks
        78700 by: Brian Clark
        78701 by: Brian Clark
        78706 by: Brian Clark

Re: faxing in PHP
        78684 by: Jim Lucas [php]
        78685 by: Bas van Rooijen
        78702 by: Steve Maroney

Re: Prev ... Next
        78686 by: Arcadius A.

Re: Fulltext-Search
        78687 by: Miles Thompson
        78697 by: Lauri Vain
        78698 by: Miles Thompson

Strings Question
        78688 by: Phillip B. Bruce
        78689 by: Matt McClanahan

Re: How to compile Apache/PHP
        78690 by: Brian Clark

Re: gd_installation
        78691 by: Brian Clark
        78704 by: EMIN CALIKLI
        78705 by: Brian Clark

Site running from MySQL
        78693 by: LaserJetter

relative path vs. INCLUDE()  !!!!!
        78695 by: Arcadius A.
        78699 by: Bogdan Stancescu
        78703 by: Justin Garrett

Supplied argument is not a valid PostgreSQL result resource
        78696 by: James Arthur

Re: PHP4 and IB SS 6.01
        78707 by: Brian Clark

PHP/MYSQL ..what the hell is wrong here...
        78708 by: Chris Cocuzzo

Warning: mysql_db_query is deprecated; use mysql_select_db() and mysql_query() instead 
in ....
        78709 by: Boaz Yahav

Re: PHP & ssi
        78710 by: Joel Boonstra

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
All,

I am having terrible difficulty trying to build 4.1.0 as an Apache shared
module. Without SNMP support, all is well. However, as soon as I add
--with-snmp=..., I get the following at compile time:

gcc: /usr/local/snmp/lib/.libs/libsnmp.so: No such file or directory
make[3]: *** [snmp.la] Error 1
make[3]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext/snmp'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext/snmp'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext'
make: *** [all-recursive] Error 1


This only happens when PHP is being compiled as a shared module, and only
happens when SNMP support is compiled in.

Anyone got any ideas?

Festive wishes,


Peter.

--- End Message ---
--- Begin Message ---
* Peter Hicks ([EMAIL PROTECTED]) [Dec 24. 2001 15:26]:

> I am having terrible difficulty trying to build 4.1.0 as an Apache shared
> module. Without SNMP support, all is well. However, as soon as I add
> --with-snmp=..., I get the following at compile time:

> gcc: /usr/local/snmp/lib/.libs/libsnmp.so: No such file or directory

Does libsnmp.so actually exist in /usr/local/snmp/lib?

> make[3]: *** [snmp.la] Error 1
> make[3]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext/snmp'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext/snmp'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/local/src/web/ssl2/php-4.1.0/ext'

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Enter any 11 digit prime number to continue.

--- End Message ---
--- Begin Message ---
Hi Brian

On Mon, 24 Dec 2001, Brian Clark wrote:

> > gcc: /usr/local/snmp/lib/.libs/libsnmp.so: No such file or directory
>
> Does libsnmp.so actually exist in /usr/local/snmp/lib?

Yes (a symlink to another file, which exists), and SNMP is detected fine
through 'configure'.

I have two theories. The first is that libsnmp.so is the name of the Apache
module that is being compiled and it is being referenced incorrectly; the
second is that a spurious .libs/ has appeared from somewhere.

As I said in the first e-mail, it works fine when PHP is to be statically
compiled in to Apache, which leads me to believe my first theory more than the
second....



Peter.

--- End Message ---
--- Begin Message ---
* Peter Hicks ([EMAIL PROTECTED]) [Dec 24. 2001 17:39]:

> > Does libsnmp.so actually exist in /usr/local/snmp/lib?

> Yes (a symlink to another file, which exists), and SNMP is detected fine
> through 'configure'.

> I have two theories. The first is that libsnmp.so is the name of the Apache
> module that is being compiled and it is being referenced incorrectly; the
> second is that a spurious .libs/ has appeared from somewhere.

OK, how about building the DSO via apxs manually and see if you get any
errors? IIRC, you can then place it in the correct directory in the
apache source and use --enable-shared=snmp in apache's configure 
*I think*. Why, let me ask Santa.. 

Yes, Santa says he believes that should work.

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Sure FAT32 corrupts your files, but look how fast it is.

--- End Message ---
--- Begin Message ---
* Brian Clark ([EMAIL PROTECTED]) [Dec 24. 2001 22:26]:

> OK, how about building the DSO via apxs manually and see if you get any
> errors? IIRC, you can then place it in the correct directory in the
> apache source and use --enable-shared=snmp in apache's configure 
> *I think*. Why, let me ask Santa.. 

> Yes, Santa says he believes that should work.

Nevermind, I need to quit smoking the mistletoe. You're trying to build
PHP with that configure option, which is *DUH* the point of this list.
Just ignore everything I said.. 

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Why doesn't DOS ever say Excellent command or filename?

--- End Message ---
--- Begin Message ---
* Peter Hicks ([EMAIL PROTECTED]) [Dec 24. 2001 17:39]:

> > > gcc: /usr/local/snmp/lib/.libs/libsnmp.so: No such file or directory

> > Does libsnmp.so actually exist in /usr/local/snmp/lib?

> Yes (a symlink to another file, which exists), and SNMP is detected fine
> through 'configure'.

OK, another try. You say the file exists, but does it exist in
/usr/local/snmp/lib/.libs? If not, you could always try a symlink to get
them acquainted. Chances are, you've already tried that, correct?

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
UNIX: measuring in inconvenient units since 57,974,400!

--- End Message ---
--- Begin Message ---
hylafax
I am working on a project right now to set this up on a linux box.  Should
work great.

Jim
----- Original Message -----
From: "LDL Enterprise" <[EMAIL PROTECTED]>
To: "*PHP-General mail list" <[EMAIL PROTECTED]>
Sent: Monday, December 24, 2001 12:15 PM
Subject: [PHP] faxing in PHP


> Hi,
>
> Is there a way to send to a fax machine like you would a email address
> in PHP.
>
>
> Thanks for any help you can give. :-)
>

--- End Message ---
--- Begin Message ---


Or use a commercial fax service, this may even be cheaper!

http://www.jfax.com/ offers email to fax.

bvr.

On Mon, 24 Dec 2001 12:26:54 -0800, Jim Lucas [php] wrote:

>hylafax
>I am working on a project right now to set this up on a linux box.  Should
>work great.
>
>Jim



--- End Message ---
--- Begin Message ---

There are many different fax daemons for unix and windows. Thier command
line tools are differnt. In the past, I have sent a fax by opening a
process to the command line tools provided by the fax software. I simply
use PHP variables as arguments.

Hope this helps.
Steve
On Mon, 24 Dec 2001, LDL Enterprise wrote:

> Hi,
>
> Is there a way to send to a fax machine like you would a email address
> in PHP.
>
>
> Thanks for any help you can give. :-)
>








Thank you,
Steve Maroney




--- End Message ---
--- Begin Message ---
http://www.onlamp.com/pub/a/php/2000/11/02/next_previous.html

Arcadius


--- End Message ---
--- Begin Message ---

htdig or mnogo


At 10:13 PM 12/23/2001 +0100, Martin wrote:
>Hello! Does anybody know a good script to search the own web-server?!
>Would be nice if the script could display the whole sentence where the
>word was found...
>
>Martin
>
>
>--
>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]

--- End Message ---
--- Begin Message ---
Hello Martin,

At 10:13 PM 12/23/2001 +0100, Martin wrote:
>Hello! Does anybody know a good script to search the own web-server?!
>Would be nice if the script could display the whole sentence where the
>word was found...

If you want to have more hands on fun then check out the following class/how-to:
http://www.evolt.org/article/Boolean_Fulltext_Searching_with_PHP_and_MySQL/18/15
665/index.html

Yours,
Lauri
--
Tharapita Creations
[dynamic web applications]
[EMAIL PROTECTED]
Mobile: +372 53 410 610


--- End Message ---
--- Begin Message ---
Lauri,

Very impressive.

Merry Christmas - Miles Thompson

At 03:03 AM 12/25/2001 +0200, Lauri Vain wrote:
>Hello Martin,
>
>At 10:13 PM 12/23/2001 +0100, Martin wrote:
> >Hello! Does anybody know a good script to search the own web-server?!
> >Would be nice if the script could display the whole sentence where the
> >word was found...
>
>If you want to have more hands on fun then check out the following 
>class/how-to:
>http://www.evolt.org/article/Boolean_Fulltext_Searching_with_PHP_and_MySQL/18/15
>665/index.html
>
>Yours,
>Lauri
>--
>Tharapita Creations
>[dynamic web applications]
>[EMAIL PROTECTED]
>Mobile: +372 53 410 610
>
>
>
>--
>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]

--- End Message ---
--- Begin Message ---
Hi,

    I want to take something like the following:

    $row = 1;
    $ column = 1;

    if ( $pages = "r$row$column")

       What I want to see is r1c1 as a string so I'm actually
concatenating the strings together.
       Any ideas?

--
************************************************************
*** Phillip B. Bruce                                     ***
*** http://pbbruce.home.mindspring.com                   ***
*** [EMAIL PROTECTED]                               ***
***                                                      ***
*** "Have you ever noticed? Anybody going slower than    ***
*** you is an idiot, and anyone going faster than you    ***
*** is a maniac." - George Carlin                        ***
************************************************************



--- End Message ---
--- Begin Message ---
On Mon, Dec 24, 2001 at 01:48:38PM -0800, Phillip B. Bruce wrote:

>     I want to take something like the following:
> 
>     $row = 1;
>     $ column = 1;
> 
>     if ( $pages = "r$row$column")
> 
>        What I want to see is r1c1 as a string so I'm actually
> concatenating the strings together.

if ($pages == "r$row" . "c$column")
--- End Message ---
--- Begin Message ---
* Miles Thompson ([EMAIL PROTECTED]) [Dec 24. 2001 08:45]:

> One little quirk. When you install MySQL from source the path to it is 
> different than when you install it from an rpm. One of them, and I can't 
> remember which, adds an extra directory layer. But really, go with the 
> compile from source.

In addition to this, Todd, the install docs at mysql.com (and the Linux
notes), are quite good, so have a look there, too, if you run into
problems. (Or was it Interbase that you wanted? Must be the egg nogg)
 
-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
3 kinds of people: those who can count and those who can't.

--- End Message ---
--- Begin Message ---
* EMIN CALIKLI ([EMAIL PROTECTED]) [Dec 24. 2001 09:47]:

> Hi ,
> I configured php 4.0.6 to run on IIS4.0 but I can 't load ph_gd.dll extension . I 
>can use other
> extensions succesfully (like php_mssql.dll ,php_pdf.dll etc.)  . Did anyone can help 
>me about this
> subject?
> Sincerely.

What's the exact error you're getting?

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Hardware: The parts of a computer system that can be kicked.

--- End Message ---
--- Begin Message ---

Hi ,
Thanks for your interests . The error is (when IIS starting);
Sincerely.

-----------------------------------------------------------
A system error has occurred.

System error 1067 has occurred.

The process terminated unexpectedly.
------------------------------------------------------------


                                                                                       
                             
                    Brian Clark                                                        
                             
                    <brianj@fusion        To:     "PHP is not a drug." 
<[EMAIL PROTECTED]>                  
                    werks.com>            cc:                                          
                             
                                          Subject:     Re: [PHP] gd_installation       
                             
                    25.12.2001                                                         
                             
                    00:11                                                              
                             
                                                                                       
                             
                                                                                       
                             




* EMIN CALIKLI ([EMAIL PROTECTED]) [Dec 24. 2001 09:47]:

> Hi ,
> I configured php 4.0.6 to run on IIS4.0 but I can 't load ph_gd.dll extension . I 
>can use other
> extensions succesfully (like php_mssql.dll ,php_pdf.dll etc.)  . Did anyone can help 
>me about this
> subject?
> Sincerely.

What's the exact error you're getting?

--
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Hardware: The parts of a computer system that can be kicked.


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





--- End Message ---
--- Begin Message ---
* EMIN CALIKLI ([EMAIL PROTECTED]) [Dec 25. 2001 01:47]:

> -----------------------------------------------------------
> A system error has occurred.

> System error 1067 has occurred.

> The process terminated unexpectedly.
> ------------------------------------------------------------

Oh my goodness, you gotta love Microsoft. You crash your car and the
policeman asks, "How did this happen?" You then tell the policeman, 
"I drove the car. I hit mailbox 1067." Full of detail, right?

Unless someone else in this forum is using ISS and knows where to look
for a more detailed error (like an error.log?), my guess is that the gd
library needs something else and can't find it. 

gd requires libpng, zlib and jpeg-6b. Now whether or not that DLL
already has that information built-in, I don't know.

Is there a tool for Windows that will let you see a specific DLL's
dependencies?

How did you install all of this? Did you use this package?

<http://www.php.net/do_download.php?download_file=php-4.1.0-Win32.zip>

Or are you using an older build?

Another thing I just noticed is the name of the file. Are you positive
the file isn't supposed to be named php_gd.dll instead of ph_gd.dll? Try
making a copy of it and renaming it php_gd.dll and try to load that
version.

If that doesn't work, try this DLL instead:

<http://php.weblogs.com/php_gd>

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
How much deeper would the ocean be without sponges?

--- End Message ---
--- Begin Message ---
Out of interest, would it be possible to load a webpage as a record in a
MySQL database, having another field as say a number or a unique name so
that a whole site could be placed in a database with a couple of php files?
Is there a limit on the size of a field in MySQL which would stop you doing
this though and would it be noticeably slower that html / php files?
I was only wondering as it would make full text searches an awful lot
simpler!!!!


--- End Message ---
--- Begin Message ---
Hello !
I've just made a nice navavigation  bar for my website ....
The nav. bar is  a php file (Templates/inc_nav.php)containing links to other
pages of my site. the links has been made relatively to the file
"inc_nav.php";
Now that I've included the "inc_nav.php" in other pages , my links no longer
work ... it seems that PHP just copy the content of the nav bar into other
pages so , links are now relavite to the current page and this of course
doean't work !!! :-(((
Is there any workaround or any othe way  to include a nav bar in PHP without
breaking the links ?
I hope you understand what I mean ...

Thanks

Arcad.


--- End Message ---
--- Begin Message ---
This is a kind of a "shit happens" answer -- ummm... nope,  there's no
workaround. The only workaround is providing a global path variable and use that
for all pages, but you probably already thought about that. Sorry for the bad
news on Christmas! :-)

Bogdan

"Arcadius A." wrote:

> Hello !
> I've just made a nice navavigation  bar for my website ....

--- End Message ---
--- Begin Message ---
There is also include_path in the php.ini file.

"Bogdan Stancescu" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> This is a kind of a "shit happens" answer -- ummm... nope,  there's no
> workaround. The only workaround is providing a global path variable and
use that
> for all pages, but you probably already thought about that. Sorry for the
bad
> news on Christmas! :-)
>
> Bogdan
>
> "Arcadius A." wrote:
>
> > Hello !
> > I've just made a nice navavigation  bar for my website ....
>


--- End Message ---
--- Begin Message ---
Hi.

I've been getting the following error:
Warning: Supplied argument is not a valid PostgreSQL
result resource in dbasefunctions.php on line 87

The error occurs in the following function:

function dbFetchRow($result,$num) {
        global $wireddb_h;

        $r = pg_fetch_row($result,$num);   // line 87

        if(!$r) {} // Error checking etc.

        return($r);
}

Can anyone explain why this happens?

--jaa

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--- End Message ---
--- Begin Message ---
* Todd Cary ([EMAIL PROTECTED]) [Dec 24. 2001 13:46]:

> Currently, the IB SS rpm puts Interbase into /opt/interbase.  Here are
> the instructions in the HowTo

OK, what you need to find are the includes for interbase. If you
installed from RPMs, you need to get the interbase "-dev" or "-devel"
equivalent also and isntall it.

> +++
> 4.Change to the PHP directory, configure PHP with PostgreSQL support
> where the PostgreSQL
>         header files directory is /usr/include/pgsql, install directory
> is /usr/local/php4, build and install
>         PHP:

>         $ cd php-4.0.4pl1
>         $ ./configure --with-pgsql=/usr/include/pgsql
> --prefix=/usr/local/php4

Just so you know, this will build PHP as a CGI, but you didn't say
whether or not you wanted this as an apache module instead. If you're
doing web-work with this, which I'd think you are, then you'll need
either --with-apxs or --with-apache=[apache's-source-dir] to build PHP
as an Apache module. 


>         $ make
>         $ make install
> +++

> Using

>     $./configure --with-interbase=/opt/interbase
> --prefix=/usr/local/php4

> produces an error: "Cannot find httpd.h" or something close to that.

Install the interbase "-devel" package, then try one of these:

$./configure \
--with-interbase=/opt \
--with-apxs 

or..

$./configure \
--with-interbase=/usr \
--with-apxs

or..

$./configure \
--with-interbase=/usr/local \
--with-apxs

or..

If you don't want an apache module built, leave off --with-apxs and
it'll create a standalone PHP executable (probably in 
/usr/local/bin/php unless you use --prefix=/usr in your configure line)

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
5 out of 4 people have trouble with fractions.

--- End Message ---
--- Begin Message ---
hey-

Ok so my plan with this stuff is to enter in a few fields for a gig into the database.

Here's the code for the page where i enter the info in:

<form action="/lib/submit.php" method="POST" target="_new">
  Date:&nbsp;<input type="text" name="date" size="30"><br>
  Location:&nbsp;<input type="text" name="location" size="30"><br>
  Venue:&nbsp;<input type="text" name="venue" size="30"><br>
  Info:<br>
  <textarea name="info"></textarea>
  <input type="hidden" name="table" value="gigs">
  <input type="submit" value="submit">
 </form>

here's the submit.php page ..which is the one that I suspect is giving me problems:

case 'gigs':
     print "$date<br>";
     $date = strtotime($date);
     print "$date<br>";
     $query = "INSERT INTO gigs VALUES('0','$date','$location','$venue','$info')";
     break;

I'm almost positive it has nothing to do with the quotes, because it never ran into a 
problem before with the quotes in the SQL statement. is there something wrong with 
that line that has the strtotime() function in it? ...Both of the print statements 
there are printing the correct values. 

here's the database description of that table:
+----------+---------------+------+-----+---------+----------------+
| Field    | Type          | Null | Key | Default | Extra          |
+----------+---------------+------+-----+---------+----------------+
| showid   | mediumint(5)  |      | PRI | NULL    | auto_increment |
| date     | timestamp(10) | YES  |     | NULL    |                |
| location | varchar(40)   |      |     |         |                |
| venue    | varchar(40)   |      |     |         |                |
| info     | mediumtext    |      |     |         |                |
+----------+---------------+------+-----+---------+----------------+

and when i query it i get this:
+--------+------------+-----------------+--------------+-------+
| showid | date       | location        | venue        | info  |
+--------+------------+-----------------+--------------+-------+
|      1 | 0000000000 | Framingham, Ma. | Denison Hall | -TBA- |
+--------+------------+-----------------+--------------+-------+

the date field is empty, but it should be filled. When i enter in the value for the 
date field in the form, I enter it as such: Jan 11, 2002  . I tested this beforehand 
and it worked. What the hell is wrong??

-chris


--- End Message ---
--- Begin Message ---
Any easy way around this?
 
Warning: mysql_db_query is deprecated; use mysql_select_db() and
mysql_query() instead in /home/WWW/weberdev/phpAds/acl.inc.php3 on line
7
 
 
thanks berber
--- End Message ---
--- Begin Message ---
> No, this isnt possible - but the constructs in PHP should allow you to
> do anything you can do with SSI just as easily.

This may be possible with Apache 2.0 and greater, once it's in stable
release (perhaps it is already).  It would allow the server to perform
multiple passes on documents, thus allowing your PHP script to execute and
output SSI, which would then get parsed by the server and be executed,
again.

Why you would need this, I don't know.  As people already mentioned, SSI's
very limited capabilities should all be available in PHP.

Joel

-- 
[ joel boonstra | [EMAIL PROTECTED] ]

--- End Message ---

Reply via email to