php-general Digest 16 Jan 2006 07:42:26 -0000 Issue 3908
Topics (messages 228631 through 228643):
Perl script passing variables to a PHP script
228631 by: John Meyer
228633 by: David Dorward
228635 by: John Meyer
Re: Using aliases to have an email trigger a php script
228632 by: Manuel Lemos
228639 by: Curt Zirzow
Re: PHP for Mac
228634 by: David Hall
PHP5/MySQL5/Apache2 Problems
228636 by: Death Gauge
228638 by: Richard Correia
imap_set_quota and php ...
228637 by: Marc G. Fournier
help plz
228640 by: suresh kumar
228642 by: Ligaya Turmelle
Re: Help taking a string from a file
228641 by: Curt Zirzow
Re: PHP and Apache
228643 by: Curt Zirzow
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 ---
Hi, If I have a perl script to rip off the mp3 tag information, can I
have that script then pass them into the PHP file?
--- End Message ---
--- Begin Message ---
John Meyer wrote:
> Hi, If I have a perl script to rip off the mp3 tag information, can I
> have that script then pass them into the PHP file?
PHP::Interpreter looks like it will do the job.
http://www.annocpan.org/~GSCHLOSS/PHP-Interpreter-1.0.1/lib/PHP/Interpreter.pm
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
--- End Message ---
--- Begin Message ---
David Dorward wrote:
> John Meyer wrote:
>
>> Hi, If I have a perl script to rip off the mp3 tag information, can I
>> have that script then pass them into the PHP file?
>
> PHP::Interpreter looks like it will do the job.
> http://www.annocpan.org/~GSCHLOSS/PHP-Interpreter-1.0.1/lib/PHP/Interpreter.pm
>
Thanks, I'll be looking into that. I also went to phpclasses.org and
found something that may be useful as well.
--- End Message ---
--- Begin Message ---
Hello,
on 01/14/2006 02:55 PM Sean Lerner said the following:
> I'd like an email received to [EMAIL PROTECTED] to trigger a
> php script.
Although it is not exactly the same thing, wouldn't it be simpler to
associate a POP3 mailbox to that address and regularly poll the mailbox
in PHP? I do that everytime to handle messages that need to be processed
programaticall. I use for instance this class to poll a POP3 mailbox:
http://www.phpclasses.org/pop3class
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--- End Message ---
--- Begin Message ---
On Sat, Jan 14, 2006 at 11:55:20AM -0500, Sean Lerner wrote:
> Hello,
>
> I'd like an email received to [EMAIL PROTECTED] to trigger a
> php script.
>
> I've configured the following:
>
> in /etc/aliases
> toronto: |/var/www/wq/email_toronto.php
>
> in /etc/exim/exim.conf
> system_aliases:
> driver = aliasfile
> ...
>
> in /var/www/wq/email_toronto.php
> #!/usr/bin/php -q
> <?
> $var_toronto_file = fopen("toronto.txt", "a");
> fwrite($var_toronto_file, "Email Received!\n");
> fclose($var_toronto_file);
> ?>
> ...
>
> A few things I've tried:
> * changed the permissions to 777 in toronto.txt and email_toronto.php to
> rule out a permissions issue
This as you checked would be the first guess. Second guess is what
is the current working directory this piped script runs at?
Third, although probably should be the first one, consists of a few
things:
1. try using an abolute path to fopen()
2. check the result of fopen, like the example of
http://php.net/fopen
3. have your script error_log() ([1] assuming your php.ini:error_log
setting is at syslog) some debug messages and look in
/var/log/messages (or where the error_log directive specifies)
If that doesn't work and your current working directory is where it
should be then some help from an exim list might be useful. I'm
rather new to configuring exim.
[1] http://php.net/manual/en/ref.errorfunc.php#ini.error-log
Curt.
--
cat .signature: No such file or directory
--- End Message ---
--- Begin Message ---
Richard Correia wrote:
Hi,
I want to install PHP5 on Mac powerbook G4. Can someone please let me know
where I can find it and it's related module?
I am mainly looking for GD and mingswf module on Mac.
http://www.phpmac.com/articles.php?view=244
very good instructions on compiling.
As shown in that tutorial (and works for me), just saying --with-gd in
the configure options works well. As for mngswf, I'd just recommend
doing .\configure --help and seeing what that pops up for how to build
mngswf in, but it should just be --with-ming, presuming you have
installed mngswf from http://ming.sourceforge.net/ (which is a whole
different world that I can't help you with.
But those directions gave me php 5 on my powerbook, so . . .
David Hall
--- End Message ---
--- Begin Message ---
I've done everything I can think of to make PHP run with MySQL and Apache. I
added PHP as a module to Apache2. I then told PHP that the
extension_dir="./ext" and then uncommented extenstion=php_mysql.dll But PHP
isn't showing anything about MySQL when I restart Apache and now Apache
won't start cause it is running into errors with PHP/MySQL. How do I fix
this? All help is appreciated.
--Death Gauge
"How do you gauge your death?!"
_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
--- End Message ---
--- Begin Message ---
can you post the exact errors?
Richard
On 1/16/06, Death Gauge <[EMAIL PROTECTED]> wrote:
>
> I've done everything I can think of to make PHP run with MySQL and Apache.
> I
> added PHP as a module to Apache2. I then told PHP that the
> extension_dir="./ext" and then uncommented extenstion=php_mysql.dll But
> PHP
> isn't showing anything about MySQL when I restart Apache and now Apache
> won't start cause it is running into errors with PHP/MySQL. How do I fix
> this? All help is appreciated.
>
--- End Message ---
--- Begin Message ---
in php, there is an imap_set_quota function that takes an integer quota
... specifically, to 'disable quotas', you issue -1 ... unfortunately,
cyrus imap doesn't accept -1 as a valid quota, so there is no apparent way
to disable from a php script ...
Is there a way around this, where -1 does work? or is someone doing
something else to get around this with php?
Thanks ...
----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED] Yahoo!: yscrappy ICQ: 7615664
--- End Message ---
--- Begin Message ---
hi,
i am working as a web designer in PHP & Mysql.i
know the basics of PHP & Mysql,i want 2 become PHP
Expert,i am planning to buy one Book,but i dont know
which book 2 buy.plz give me info .
A.suresh
Send instant messages to your online friends http://in.messenger.yahoo.com
--- End Message ---
--- Begin Message ---
I personally liked George Schlossnagle's book "Advanced PHP
Programming", published by Sams.
http://www.amazon.com/gp/product/0672325616/qid=1137394700/sr=2-1/ref=pd_bbs_b_2_1/104-0195316-0794320?s=books&v=glance&n=283155
suresh kumar wrote:
hi,
i am working as a web designer in PHP & Mysql.i
know the basics of PHP & Mysql,i want 2 become PHP
Expert,i am planning to buy one Book,but i dont know
which book 2 buy.plz give me info .
A.suresh
Send instant messages to your online friends http://in.messenger.yahoo.com
--
life is a game... so have fun.
--- End Message ---
--- Begin Message ---
On Sat, Jan 14, 2006 at 09:03:24AM -0700, Lists wrote:
>
> My goal is to take just the HTML for the image and link from the
> Flickr badge js script.
> ...
>
> <?
> // allow retrieval of external web source
> ini_set('allow_url_fopen',1);
>
> // get flickr js file
> $photo = file_get_contents("http://www.flickr.com/badge_code_v2.gne?
> count=1&display=latest&size=m&layout=h&source=user&user=91667218%
> 40N00");
>
> //get rid of all the crap except for the image tags
> ...
You're best aproach would be to look fo what you want. If all you
have to work with is some poorly written html doc and you want the
<a> <img> tag important parts?
preg_match('/<a href="([^"]+)".*?><img src="([^"]+)"/, $photo, $matches);
var_dump($matches);
Otherwise contact flicker and ask them for an API for what you are
trying to do. And if the above works dont expect it to work all the
time.
Curt.
--
cat .signature: No such file or directory
--
cat .signature: No such file or directory
--- End Message ---
--- Begin Message ---
On Sun, Jan 15, 2006 at 09:34:40AM -0800, Erik Saline wrote:
> Using Fedora Core 4 using the already Apache and Mysql. I tried using the
> already installed PHP but mysql support was not setup or shown when using
> phpinfo().
>
> I recompiled PHP with the following.
>
> './configure' '--with-mysqli=/usr/bin/mysql_config'
> '--with-mysql=/usr/bin/mysql_config' '--enable-sockets'
> '--with-jpeg-dir=/usr' '--enable-exif' '--with-apx'
First off, --with-mysql doesn't expect a mysql_config as an option
but the $prefix directory were mysql was installed.
>
> Now all my PHP scripts do not work here is the error I find in the Apache
> Error logs.
>
> [Sat Jan 14 15:19:02 2006] [error] [client 192.168.1.1] (8)Exec format error:
> exec of '/var/www/cgi-bin/create_user.php' failed,
> [Sat Jan 14 15:19:02 2006] [error] [client 192.168.1.1] Premature end of
> script headers: create_user.php,>
>
This is a sign that your in rpm hell.
> I can use php -i >phpinfo.html and see that PHP works and that mysql is now
> loaded.
> I added this to my httpd.conf
but what does assuming your 'whatis database is upto date':
'locate php | grep bin' give?
'locate libphp' give?
'locate php' give?
And from those locates:
ls -laF <filenameoflocate>
My Guess:
you will have a:
/usr/bin/php
/usr/local/bin/php
/path/to/apache/modules/libphp(45).php
Once that is figured out, what about the extenstions? is there any
thing in your php.ini that specifies an extension_dir and/or
extension=something.so?
Last but should be first, check logs, turn on php.ini:error_log to
syslog, turn on display_startup_errors, check /var/log/messages, if
that doesnt work make sure php.ini:error_reporting is E_ALL. If
that doesn't work.. are you sure you are editing the correct
php.ini for the environment you are using?
>
> AddType application/x-httpd-php .php
This is for using php as a moudule, the error you are getting is
based on php ran as a cgi.
> # which php at the command line returns
> /usr/local/bin/php
try: /usr/bin/php -i
>
> Do I need to add something in the httpd.d to direct it to /usr/local/bin/php
> instead of the intial defalt where
> # which php returned
> /usr/bin/php
Ah, yeah, well, the thing you need to do is:
1) either get rid of the system's installation of php and do the
installation by hand. Getting rid of php via the systems
installation process. Be forwarned, do this with care.
2) use fc5
Curt.
--
cat .signature: No such file or directory
--- End Message ---