php

PHP Source Control Server

I there a PHP based source control 'server' that is compatible with SVN clients? I'd like to host my SVN on my hosting servers, however the current host will not allow me to start any process or install any software ...

PHP get rid of slashes full path

Hey everyone, I have a full path which I would like to remove certain levels of it. So for instance, /home/john/smith/web/test/testing/nothing/ I would like to get rid of 4 levels, so I get /test/testing/nothing/ What would be a good of doing this? Thanks ...

How do I debug an Atompub POST sent via cURL to Wordpress on XP + Apache 2.2 + XDebug

I've been using NetBeans as the XDebug interactive debugging client. But seems like it only supports attaching debuggers to scripts that are invoked via Firefox. I want to step through the request parse script when it's invoked via cURL. ...

How to make php5 on a machine running php4, without breaking anything

I know with python and a couple other languages there is a way to safely make install a newer generational version of a language onto a machine, but after digging through PHP5's configure & makefile the only thing I've seen is the prefix dir option and the ini scan path. Ideally I'd like php5 to have its own lib/bin subdirectories in /u...

Good LAMP book(s) for ASP.NET developer?

I'm looking for a (few) good books to get started with LAMP development. I'm a long time Microsoft developer, including heavy ASP.NET, and I want to learn LAMP for a number of reasons. What are some good books to get started, for someone coming from ASP.NET? Any books targeting the more recent versions of PHP would be appreciated. [NOT...

How to delete an element from an array in php?

Hi, does anyone know an easy way to delete an element from a php array? I mean so that foreach($array) no longer includes that element. I thought that setting it to null would do it, but apparently not. Thanks, Ben ...

Items from multiple categories best practices

Hi, I'm making list of items in categories, problem is that item can be in multiple categories. What is your best practice to store items in categories and how list all items within category and its child categories? I am using Zend Framework and MySQL to slove this issue. Thanks for your replies. Sorry for my English :) ...

Using PHP variables in your CSS file in Symfony

I'd love to use PHP variables in my CSS files but I don't want to load up the whole Symfony stack for each file load. Any one have any best practices and/or plugins to manage their CSS files in Symfony? ...

Outer Join using Propel 1.2?

I'm trying to do an Outer Join in Symfony. Here's the bit of code that seems like it would work if Criteria supported OUTER_JOIN: $user = sfContext::getInstance()->getUser(); $petCriteria = new Criteria(); $petCriteria->add(PetInfoPeer::ACCOUNT_ID, $user->getProfile()->getAccountId()); $petCriteria->add(LostPetPeer::PET_INFO_ID, Criteri...

ExpressionEngine Multiple Site Manager and Member Groups

I’m looking for some links to further info on how EE handles Member Groups in relation to the MSM. In my case, I have two membership sites. Generally speaking, the two sites serve the same overall group of people, so the fact that the MSM shares the member database works in my favor. What I’m unclear about is how to manage the varying c...

Work around magic quotes, or just make sure they're off?

Is it worth changing my code to be "more portable" and able to deal with the horror of magic quotes, or should I just make sure that it's always off via a .htaccess file? if (get_magic_quotes_gpc()) { $var = stripslashes($_POST['var']); } else { $var = $_POST['var']; } -- vs -- php_flag magic_quotes_gpc off ...

Recommend a PHP ACL class?

In reference to my other question, I'm looking for a good php-based ACL class that I can integrate into ExpressionEngine to get better support for member access control. So far I'm looking at the Zend Framework ACL class. Is anyone using anything else they recommend? Thanks! ...

php and mysql proc

If php code like below how it's like as mysql store procedure equvilant.If any links tutorial on advance store proc mysql please put. $sql=" SELECT a,b FROM j "; $result=mysql_query($sql); if(mysql_num_rows($result) > 0 ) { while($row=mysql_fetch_array($result)) { $sql_update="UPDATE b set a=".$row['a']."'"; mysql_query(...

How Load a PHP page in Same Window in JQuery

Dear All, I have Test.php and it has two functions: <?php echo displayInfo(); echo displayDetails(); ?> Javascript: <html> ... <script type="text/javascript"> $.ajax({ type:'POST', url: 'display.php', data:'id='+id , success: function(data){ $("#response").html(data); } ...

Silly sprintf() question

How do I add the SQL wildcard characters to this: sprintf("SELECT robot FROM robots WHERE robot LIKE '%s'",strtolower($user_agent)); as sprintf("SELECT robot FROM robots WHERE robot LIKE '%%s%'",strtolower($user_agent)); blows up in a spectacular ball of flame, PS sorry for the rather basic question. I'm cutting down on my c...

javascript problem - including php

Hello, I have the code pasted below, which servers as the core of a small ajax application. This was working fine previously, with makewindows actually displaying a popup containing the rsult of artcile_desc. I seem to have an error before that function however, as now only the actual php code is outputted. This is not a problem with my...

In PHP, how many DB calls per page is okay?

I've got shared hosting on a LAMP set up. Obviously the fewer calls to the Db per page the better. But how many is too many? Two? Ten? A hundred? Curious what people think. ...

What's the best way for a fairly experience developer to learn PhP

I got decent experience in .Net, and some experience in Python, and zero experience in PhP. Now I want to learn some PhP, is there any web resources that are geared towards person like me? And what are the tools that PhP programmers normally use? Duplicate: PHP tutorial or/and tool has been already discussed at SO many time. /what-...

Using HTML Mime Mail for PHP to send email, but need to authenticate through Exchange server

First off, the server: Exchange 2003 sp2 running on Windows 2003 Server sp2 I have a script that sends email to two email accounts, one called students@ and the other being fs@ (faculty/staff). We are setting both those email accounts to only accept incoming email by authenticated users on the exchange server, to spare ourselves from sp...

How to skip the 1st key in an array loop?

I have the following code: if ($_POST['submit'] == "Next") { foreach($_POST['info'] as $key => $value) { echo $value; } } How do I get the foreach function to start from the 2nd key in the array? Thanx. ...