php5

Building PHP Competencies in an organization

Hi, This is not really a technical programming question, but has more to do with best practices and programming / project management processes. Here's some background information: I'm a consultant with an agile (scrum) software development company that specializes in the Java, J2EE, Flex technology stack. Here it is generally perceiv...

Zend MVC - htaccess redirect

All, My Zend framework Application structure is like this: billingsystem -application -design --css --struct.css --icons --styles --images --js --common --thirdparty -public --index.php --.htaccess -library -- Zend My Apache VHost is like this: <VirtualHost *:80> ServerAdm...

TinyMCE in PHP whit sub.domain.com

Hello all i have this config file http://pastebin.org/85981 the problem is before i have change $mcImageManagerConfig['filesystem.rootpath'] from simplecms.info to cms.schemecloud.com its have no problems, but after i have change the domain its giving problem when i select the URL its only comming whit .com and not cms.schemecloud....

JQuery UI Tabs - Load AJAX Tab content

All, I am using JQuery UI Nested tabs. Consider the structure like this: There are 2 Main tabs: Animals, Birds. Under Animals, there are two tabs "Cats", "Dogs". Both the tabs "Cats" and "Dogs" should be loaded via AJAX when selected.. So, the code for them is something like this: <div id="fragment-1"> <ul> <li><a href="/pub...

Win2003, Apache 2.2.11, error loading random modules on restart after crash of PHP child process

Hello, I am having a weird problem with Apache/2.2.11 (Win32) DAV/2 PHP/5.2.9, running on Windows Server 2003. It was installed with XAMPP, from www.apachefriends.org, but I can't find anything in their forums. We have a Wordpress MU installation on this server, and there is apparently some problem in the PHP code there that is causing...

Jquery UI tabs - Custom "Loader" for AJAX tabs

All, I have the following code to generate Jquery UI tabs: <div id="tabs-loading-message" style="display:none">Loading, Please wait..</div> <div id="fragment-2"> <ul> <li><a href="/public/animalstab" title="Animals"><span>Animals</span></a></li> <li><a href="/public/birdstab" title="Birds"><span>Birds</span></a></li> ...

PHP won't echo XML child

Here is my code <form method="post"> <input name="hash" type="text" id="hash" style='width: 30%;'/> <input name="Crack!" type="submit" value="Crack!" onfocus="if(this.blur)this.blur()"/> </form> <?php if(isset($_POST['Crack!'])){ $hash = $_POST['hash']; $xml = simplexml_load_file("http://gdataonline.com/q...

PHP Variable problem!

So I have a PHP variable that's value get's replaced from another PHP file. Example: $var = "~~~OtherVariable~~~"; If I echo this variable out, it prints out the appropriate string. Example: echo $var; //prints out "This is a string of text"; So it looks like everything is working thus far, my PHP variable ($var) shows that it actu...

Zend Framework Upload Problem

90% of images that I upload with Zend Framework work great and they can be displayed in the browser without a problem but sometimes there si an image that gets uploaded without error yet when I try to display it in the browser I get this error (from time to time, sometimes the image will start loading but it will take ages and it won't l...

My database query keeps setting all columns to the same value in MySQL

I can't figure this one out; it's probably really obvious to everyone's eyes except mine. Here is my update method for Kohana 3. public function update($type, $id, $updates) { $info = $this->getInfo($type); $dbTable = $info['table']; $updatesKeysToValues = array(); var_dump($updates); foreach(...

set_time_limit() not working, timing out who knows why?

I have an upload form that uploads mp3s to my site. I have some intermittent issues with some users which I suspect to be slow upload connections... But anyway the first line of code is set_time_limit(0); which did fix it for SOME users that had connections that were taking a while to upload, but some are still getting timed out and I ha...

Hide or encrypt urls of files?

Hello everyone and thank you for your time. I would just like to say that even though I'm no noobie at php, I don't know everything yet and I still lack some knowledge to be able to tackle some of these problems. My current dilemma is: I have a database with user-made songs that have all kinds of information including the location of ...

How do you proxy though a server using ssh (socks…) using php’s CURL?

I want to use ssh, something like this: ssh -D 9999 username@ip-address-of-ssh-server But within php CURL, but I don't really see how this could be done? I noticed “CURLPROXY_SOCKS5” as a type in the php site, but guess that wouldn’t work since it isn’t really socks, it’s ssh… I’m currently using this code: curl_setopt($ch, CURLOPT...

How to refer to Object attribute without knowing exact name?

I'm actually working with SOAP at the moment, and annoyingly the response name varies depending on the method I call. For example, one method will respond with.. $response->SendOrderResult whilst another responds with $response->GetOrdersStateResult Is there a way of referring to the value without knowing the name? ie something li...

How do I tell if a varible is public or private from within a PHP class?

Hi, I'm sure I could find this on PHP.net if only I knew what to search for! Basically I'm trying to loop through all public variables from within a class. To simplify things: <?PHP class Person { public $name = 'Fred'; public $email = '[email protected]'; private $password = 'sexylady'; public function __construct() { ...

Struts vs Zend ? Java vs PHP ?

I know it's a hot question that need anwsers ^^ From my viewpoint, using Java vs PHP, is nowadays a problem of system resources (Hardware, Software, etc.). For Java, you have to deploy J2EE Stack (JDK, AppServer, etc.) (~200M) on your server, for PHP you need to deploy a LAMP system (~100M). Using Java was in my opinion due to object o...

Apache not loading Xdebug, but does when started from the Command Line

I know that this sounds odd, but believe me, it's what is happening. Here are my system settings: Windows7 Apache 2.2 PHP 5.2.12 Xdebug 2.0.5 I have XDebug configured in my PHP.ini file. When I run php -m, I do in fact see that Xdebug is loaded. Now, if I start Apache AS A SERVICE (or by the Apache Monitor), and run phpinfo(), it is ...

SQL function to sort by most popular content

I don't know if this is possible with SQL: I have two tables, one of content, each with an integer ID, and a table of comments each with an "On" field denoting the content it is on. I'd like to receive the content in order of how many comments have it in their "On" field, and was hoping SQL could do it. ...

How would I echo this in PHP using SimpleXML

Response example for MD5 hash found, for example http://md5.noisette.ch/md5.php?hash=2a0231531bc1a7fc29e2fa8d64352ae9 : <md5lookup> <hash>2a0231531bc1a7fc29e2fa8d64352ae9</hash> <string>noisette</string> </md5lookup> Response for MD5 hash *not* found, for example http://md5.noisette.ch/md5.php?hash=11111111111111111111111111111111 ...

PHP Configuration: It is not safe to rely on the system's timezone settings.

Here a weird one. I just upgrade to php 5.3.0 and since the upgrade I'm getting the following warning: Warning: getdate() [function.getdate]: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of tho...