php

Change php info in a server

hi In my php project i have to upload a file with 11mb. maximum uploading size is 24 mb. But sometimes i got maximum time execusion error, How i avoid this problem. Is it possible to change the max_execution_time in php configuration using any scripting. ...

Can PHP communicate with Dynamics AX business connector?

PROBLEM: I need to feed data from a PHP script into Dynamics AX. METHOD: I suppose the easiest way to do this is by using the Dynamics AX Business Connector. QUESTION: Is it possible to connect to the Dynamics AX Business Connector directly from a PHP script? If so: How? ...

Leap in time in PHP's function time()

Using the timestamp of PHP's time() function, I show the current time to the user with date(). Format: H:i => 13:57 But sometimes there seem to be leaps in time. My windows clock was showing 13:40 when I visited the page. But my website said 14:XX. I don't know the exact time any more. Another example: A user accessed the page "Who is...

Basic Oriented Object Modelization in PHP5

Hi, I use zend framework and I would like to have your advice to modelize my classes. I have 3 classes Patrimony.php Project.php and Version.php. Version extends Project extends Patrmimony. In other hand I have a folder structure like this /data/patrimonies/projects/versions/ I don't know if I have to use a Design Pattern or something ...

Google app engine for static files in joomla

hi i want to use google app engine for the static data for my joomla website currently my site is http://webkul.com i want to put all the css and js files in the app engine please help i am using google app engine first time if there is any good tutorial please put it here thanks ...

XPath result to PHP Object

Hi, I have an xml file which represents a number of objects for which I have a class in my application. For example, blogposts: <blogposts> <blogpost id="604"> <title>afdghadfh</title> <body>adfgadfgda</body> </blogpost> <blogpost id="605"> <title>dafghadh</title> <body>afadf</body> </blogpost> </blogposts> ...

Remove All Text After Certain Point

Hey, I'm just wondering how I could remove all the text if it encounters a certain string inside a string : EX: 24 Season 1 Episode 3 I would like, that if it find the text Season that it removes it and everything after so it would just leave you with : 24 Thanks Ah sorry I forgot to say I need this in PHP. ...

Loading results text PHP

I need a simple way to show that results are loading.. from database, while the page loads. I am not using jQuery to do this. What I tried now is: I put a <div> tag with loading text in it and using JavaScript I made the display to none after the whole while loop. But I don't get to see the text at all. <div id="loading">Loading Resu...

PHP Get element with 5 highest occurrence in an array

Something similar to this: http://stackoverflow.com/questions/1053843/get-element-with-highest-occurrence-in-an-array Difference is I need more than 1 result, need 5 results altogether. So the 5 top highest occurence in a (large) array. Thanks! ...

SQL Server to MySql converstion, i want convert the SQL Server query dump to mysql database

SQL Server to MySql conversion, i want convert the SQL Server query dump to mysql database. I have SQL Server query dump. Please give me a good conversion tool free of cost. I tried with phpmyadmin import feature, its not working. ...

$_GET and $_POST

Hi , Really silly question but having a off day today. basically I have a form and the method is set to post on the action page when I use $_POST i dont get the value but if I use $_GET or $_REQUEST I do. this does not make sense could some on just clarify it for me. the code of the form is <form action="create.php" method"POST"> ...

How to implement mysql compress() function in php

I want to compress TEXT for storing in MySQL. So I would just do gzcompress() in php and then send to mysql, but I am also setting up Sphinx full text search, and it would be nice if it can populate its index with a simple query i.e. select uncompress(thing) from table However I would still like to do compression and decompression for...

Mysql PHP Script to slow needs refactor

Hi I have 2 mysql tables and they both need updating, companies unique_code Companies holds 1 million records and I need a unique code asigning to each one, the problem I have is my PHP script grabs all the companies and in foreach loop grabs a unique code from table unique_code and updates, it also then updates unique_code table to ...

How would I do an OR statement with a Switch case? (PHP)

How would I go about converting this if statement: for($i = 1; $i < $argc; $i++) { ... if(in_array($argv[$i], array('-V', '--version'))) { $displayVersion = TRUE; } ... } Into a switch case without needing to write two switch statements? ...

How to realize jQuery async treeview in PHP?

Hello, I want to integrate an async treeview in PHP. Now i want to know how to generate a source php file with PHP. Now my database structure is like this: Create table School( id int(10) NOT NULL AUTO_INCREMENT, name varchar(50), primary key(id) ); Create table Class( id int(10) NOT NULL AUTO_INCREMENT, name varchar(50), school_i...

Post data again after authorization

I have a cakephp application where there is a form that is visible to visitors who haven't even logged in. If they submit the form without logging in, they are redirected to a login page from where i want them to go back to the add controller with all the submitted form data. Is this possible? If yes, how? ...

How do I CURL www.google.com - it keeps redirecting me to .co.uk

I am using CURL to check for the existence of a URL (HEAD request) but when I test it with www.google.com, it redirects me to www.google.co.uk - probably because my server is UK-based. Is there a way you can stop this from happening? I don't want to remove the CURLOPT_FOLLOWLOCATION option as this is useful for 301 redirects etc. Part...

imap_search limit the number of messages returned

Hi, I have PHP script that fetch messages from a mailbox. I use the imap_search function: $emails = imap_search($mbox, 'UNSEEN'); Is there a way to limit the number of returned messages. Right now on huge mailboxes i get like 5000 messages. I want only the top 20 ordered by date. Is there a way to do that? Thanks. ...

Javascript source in partial view of symfony

Hi everybody. I'm using symfony 1.4, I wrote a piece of js code to use in a template, and I want to put it in a JS separated file because I'll use it many times in the code. I added the JS to the template using: <?php use_javascript('mi_js') ?> This templates has some ajax calls that refresh zones of the view with renderPartial meth...

display time in a web page

Hello, I have page where where I list all comments for a post. Next to each comment I have a time value in full format including the date/time (2010-01-02 11:11:20). I know that I can format it in PHP before displaying it, so it shows; posted 40 secs ago posted 5 days ago but that would not be efficient as I am going to cache the...