php-general Digest 3 Apr 2007 10:33:36 -0000 Issue 4713

Topics (messages 251955 through 251968):

Re: Problems with mail
        251955 by: Chris

Re: Cannot remove PHP Version 5.2.1-0.dotdeb.1
        251956 by: Miles Thompson

secure database info in different environments
        251957 by: Bruce Cowin
        251964 by: Jochem Maas

Re: Example from www.php.net
        251958 by: Chris

Re: Google-Yahoo venture and PHP
        251959 by: Chris

Re: Get free broadband internet from google!
        251960 by: Tijnema !

mixture of GET and POST
        251961 by: Ross
        251962 by: clive

Re: Forking doesn't work on php 5.2.1?
        251963 by: Jochem Maas

Re: php 5 upgrade and background script on unix
        251965 by: Jochem Maas

Re: Ide help needed
        251966 by: clive
        251968 by: Johan Martin

php-mysql problem
        251967 by: Me2resh Lists

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:
        php-general@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Mário Gamito wrote:
Hi,

I have this very straight forward code to send an e-mail:

$subject_users_subscription_confirmation = "Subscription confirmation";
$message_users_subscription_confirmation = 'Please, click this link to
confirm your subscritpion:
http://www.telbit.pt/subscribe-confirm.php?email=' . $email . '&conf=' .
$barfles;

mail($email, $subject_users_subscription_confirmation,
$message_users_subscription_confirmation);      

The three variables are ok, as i debuged them with prints, but no mail
is sent.

If i do a test with

mail('[EMAIL PROTECTED]', 'Hello', 'Hello');    

then the mail is sent ok!

So mail() works, which means you're doing something wrong or your host is blocking the email or spam filters are catching it.

If you're on a test machine, watch the mail logs and see if that gives you any clues about what's going on.

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Thanks Mario, I'll try that tomorrow morning.
Much appreciated - Miles

On 4/2/07, Mario Guenterberg <[EMAIL PROTECTED]> wrote:

On Mon, Apr 02, 2007 at 04:52:02PM -0300, Miles Thompson wrote:
> This probably belongs under php-install, but thought I would try here
first,
> and it comes under the general header of "Be careful what you wish for".
>
> On a new Ubuntu (Debian) server I installed this version of PHP because
I
> wanted some 5.2 features. It's the hardened version, and not the one we
> want.
>
> I have done the conventional "aptitude remove php5", and then went to
all of
> the directories returned by "whereis php5" and manually removed them.
>
> I've rebooted both the server and my own computer, and still a
> http://localhost/phpinfo.php returns the phpinfo() data AND shows
> configuration file paths: etc/php5/apache2 and /etc/php5/apache2/conf.d
> which have been deleted.

Try dpkg --purge php-5.2.1 or so.
You may have only the php binaries (CLI) removed.
This removes the config-scripts at all.
Apt-get remove libapache2-mod-php5 removes your apache2 modules and
the dpkt --purge libapache2-mod-php5 removes all the config scripts
of them.

I have build php 5.2.1 from source on Ubuntu 6.10 and it works
fine. Installad in /usr/local for some system reasons and of course
a easy way to upgrade.

Greetings
Mario
--
-----------------------------------------------------
| havelsoft.com - Ihr Service Partner für Open Source |
| Tel:  033876-21 966                                 |
| Notruf: 0173-277 33 60                              |
| http://www.havelsoft.com                            |
|                                                     |
| Inhaber: Mario Günterberg                           |
| Mützlitzer Strasse 19                               |
| 14715 Märkisch Luch                                 |
-----------------------------------------------------

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iQIVAwUBRhFizDUZahlMISn3AQIJaBAAkb0tlZFXTO/6yRgZGf0tP4+U1eiTGnMR
r+jqzCiYD3EA6vg7Qlf7K97nn+Jo9CwuYLC2WXRIWGoHK8Mor5UqWPLX6mRFut2w
d19ksKv605Dq1FuweNzTAZo9SiJwG8DsZ9Kj0Xboysu5098g/mV+mTvcnyONDmDU
6XiLqHkfITkUES/Hn3Nb0mOSNI7K41lipm/3TrWqPep1Fs/QUyDb/wtLRzfrcScm
CmdDCE+nBsKtCdtcZD3VDNN4F3O4x2ZbM1yAp9+S5yQn0b1kK4HoAJ99dpCR+Q4V
C+O5VFDr515dujlMo4+CcGPe63xLvU8wn2f5P1vcXcQFPEBj5zJYZGQSPWfrVeBa
H0R7sNraBOL+JJD1c5eSYIbZBCjFnaKyMzlQCJ/qgmG/t1akzNJdNlBJ15lMn8dd
d8nsa5Za/19ULJR0cPq0CyjAgd1+S0/ykUOGDa2S0uIhURB3AJ/xf2ffH23XbI6m
So5maXF2I9hsOwYkZgxv4Kv+HhgJAQesFj7FwBjljXcPXYlXX3DWzC1VwzTKik3F
kHviM3PH9XSoGlizwIAwBKlq3sY/CnUo7xoWvmapVvpJDEumi2AvgpDkBl27ogEV
Rh7wx0twS8WCSytNSz3XeFJIwmdtrQudXBbNGBSOU6NOk3NwbMhKt5JX2RL7omwE
D0lQzqENPDY=
=cWaV
-----END PGP SIGNATURE-----



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

I have a generic database class that I built to connect to our different 
databases.  From other posts that I've read, I think the safe thing is for me 
to put this file outside the web root, ensure it has a .php extension, set the 
include path to include this folder and include it in any pages that require 
it.  Is this correct?

Also, how do you handle the different environments: dev, test, and prod?  I 
don't want to have to change the code every time I copy the file over.  Do I 
have an independent file that determines if that folder should point to 
dev/test/prod?

Thanks for your help.



Regards,

Bruce

--- End Message ---
--- Begin Message ---
Bruce Cowin wrote:
> Hi,
> 
> I have a generic database class that I built to connect to our different 
> databases.  From other posts that I've read, I think the safe thing is for me 
> to put this file outside the web root, ensure it has a .php extension, set 
> the include path to include this folder and include it in any pages that 
> require it.  Is this correct?
> 
> Also, how do you handle the different environments: dev, test, and prod?  I 
> don't want to have to change the code every time I copy the file over.  Do I 
> have an independent file that determines if that folder should point to 
> dev/test/prod?

I generally use CVS to store my work and also to 'publish' stuff onto different 
setups/machines for testing/production,
rather than moving/copying files manually - I find it alot easier to type 'cvs 
up -r SOME_TAG' and just have all the
files updated with out having to think about which exactly files I must copy.

I usually end up with a small config file that is not included in the [cvs] 
project (so it must be created manually
for/in each installation) and have the project 'init' code check for the config 
file, require it and then test for the
existance of some required constants/variables/etc - if the file is missing, 
not readable or expected constants/vars/etc
are missing then the app dies with a suitable error message.

> 
> Thanks for your help.
> 
> 
> 
> Regards,
> 
> Bruce
> 

--- End Message ---
--- Begin Message ---
Timothy Murphy wrote:
Timothy Murphy wrote:

I was trying Example 2147, which reads:
-------------------------------
<?php
$string = <<<XML
<a xmlns:b>
 <foo name="one" game="lonely">1</foo>
</a>
XML;

$xml = simplexml_load_string($string);
foreach($xml->foo[0]->attributes() as $a => $b) {
    echo $a,'="',$b,"\"\n";
}
?>
-------------------------------
...
However, in my case it outputs nothing.
(I'm running php-5.1.6 under Fedora-6.)

I see that the example does work if I substitute
<a> for <a xmlns:b>.
[I'm not sure what effect the xmlns:b has?]

If it's an official comment (not a user comment) then post a documentation bug report at http://bugs.php.net/

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Matt Kay wrote:
I really dont see what all the fuss is about. If MS is going to have us all
running
on thin clients, and Google/Yahoo want to beat them to the punch, is this
really
going to matter who we pay? The article on digg.com
http://digg.com/tech_news/Google_Yahoo_Merger_Redefines_Access
simply means we will be getting our desktop as a service, and MS have the
same
goal. PHP will only be a small part of this if Zend decide to throw thier
lot in also.

Did you look at the date? ;)

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
On 4/1/07, TheOldFellow <[EMAIL PROTECTED]> wrote:
On Sun, 1 Apr 2007 15:54:33 +0200
"Tijnema !" <[EMAIL PROTECTED]> wrote:

> I'm testing if it works now, I already put the cable down into my
> toilet and waiting for google to connect me :) I hope they work on
> sunday too :)


I'll bet the service is crap.

R.

Yes the service is very crap. But that was because I didn't read that
it was only in the USA. Not in the Netherlands...

Well, I took the cable out of my toilet, and contacted my regular ISP
again and told them NOT to disconnect me.. :)

Tijnema

--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


--- End Message ---
--- Begin Message ---
I have 3 'action' buttons and I am trying to send the $id from the radio 
button and the action to the same page so I can either, Add Edit or Remove 
the property from the database.

Any ideas how I can get this to work? I can either POST the id's or GET the 
action but I can't seem to return both to the browser.

Ta,


R.

--------------------------------------

<form id="form1" name="form1" method="post" action="">

<div id="button_holder">

<a href="?action=add&id=<?=$id;?>">Add Property</a>

<a href="?action=remove">Remove Property</a>

<a href="?action=edit">Edit Property</a>

</div>

<div id="table_header">

</div>



<table id="properties_table">

<?php

$query = "SELECT * FROM properties";

$result= mysql_query($query);

while ($row = @mysql_fetch_array($result, MYSQL_ASSOC)){


?>

<tr><td class="col_one"> <input type="radio" name="id" value="<? echo 
$row['property_id'];?>"></td>

<td class="col_two"><?php echo $row['property_id'];?></td>

<td class="col_one"><?php echo $row['address'];?></td>

<td class="col_two"><?php echo $row['postcode'];?></td>

<td class="col_one">£500</td>

<td class="col_two">Live</td>

</tr>


<?


} ?>

</table>

</form>

--- End Message ---
--- Begin Message --- This has nothing to do with php, I suggest you read up on how html forms work and you may need to learn some javascript.

clive.



I have 3 'action' buttons and I am trying to send the $id from the radio button and the action to the same page so I can either, Add Edit or Remove the property from the database.

Any ideas how I can get this to work? I can either POST the id's or GET the action but I can't seem to return both to the browser.

Ta,


R.

--------------------------------------

<form id="form1" name="form1" method="post" action="">

<div id="button_holder">

<a href="?action=add&id=<?=$id;?>">Add Property</a>

<a href="?action=remove">Remove Property</a>

<a href="?action=edit">Edit Property</a>

</div>

<div id="table_header">

</div>



<table id="properties_table">

<?php

$query = "SELECT * FROM properties";

$result= mysql_query($query);

while ($row = @mysql_fetch_array($result, MYSQL_ASSOC)){


?>

<tr><td class="col_one"> <input type="radio" name="id" value="<? echo $row['property_id'];?>"></td>

<td class="col_two"><?php echo $row['property_id'];?></td>

<td class="col_one"><?php echo $row['address'];?></td>

<td class="col_two"><?php echo $row['postcode'];?></td>

<td class="col_one">£500</td>

<td class="col_two">Live</td>

</tr>


<?


} ?>

</table>

</form>



--
Regards,

Clive.

Real Time Travel Connections


{No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.}
--- End Message ---
--- Begin Message ---
Sebe wrote:
> Jochem Maas wrote:
>> Frederic Belleudy wrote:
>>  
>>> Well Ill let you know guys if it works after I've recompiled apache
>>>     
>>
>> try recompiling php - recompiling apache won't have an effect as far
>> as that compile
>> option goes.
>>  
>>   
> it will if php is complied statically into apache, then you have to
> recompile apache each time you compile php.. i use static because u get
> better performance, but that's another topic of it's own..

I see - I hadn't considered that. do you have any resources to point
to with regard to learning to compile php into apache statically?

> 

--- End Message ---
--- Begin Message ---
Frederic Belleudy wrote:
> Jochem:
> won't it? what does it do? does it go into and endless loop and bring
> your machine to a halt
> by any chance? .. because by looking at it, as long as $in['bg'] is not
> set and not equal to
> true it's going to keep spawning sub-shells with cmdlines that call itself.
> 
> Me:
> You haven't read my message? 

yes I did.

> It works fine when Im running it from the
> shell

the question was referring to what happens when running the exec() line
via the apache php module, I had thought that that was obvious.

> 
> When I do:
> 
> `/usr/local/bin/php /www/admin.gammacash.com/test/test_fork.php bg=1
> 2>&1 /var/log/test.log &`
> you can see bg=1
> 
> its the passing arguments!
> any other suggestions?

fix/debug it yourself.

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

Does anyone knows any IDE for PHP like VisualStudio.net?

look at delphi for php, its not delphi the language but a IDE written by borland to develop web apps using forms/drag 'n drop and php. Windows only im afraid and the only php IDE of its kind that Ive come across.

I use linux so I wont be using but you might like it.

http://codegear.com/Products/Delphi/DelphiforPHP/tabid/237/Default.aspx

--
Regards,

Clive.

Real Time Travel Connections


{No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.}
--- End Message ---
--- Begin Message ---
On 4/3/07, clive <[EMAIL PROTECTED]> wrote:


> Does anyone knows any IDE for PHP like VisualStudio.net?


Second the use of eclipse. Look at easyeclipse.org - they have all the
necessary plug-ins and add-ons in easy an easy to install package. Packages
available for Linux, Mac and Windows. Includes tools for Smarty, database
editing and html editing.

--- End Message ---
--- Begin Message ---
hi
i need help regarding a sql query in my php app.

the query is :
   $SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes'
LIMIT $startingID,$items_numbers_list";

i want to sort this query by the number of the repeated EMail counts.
can anyone help me with that please ?

--- End Message ---

Reply via email to