php

access + mysql converting to webplatform = (php + asp.net + mysql)?

i have a database that is written in access. the access mdb file connects via ODBC to a local mysql database. i have a bunch of sql and vba code in the access file. i dont expect the database to surpass 100mb. currently it is around 10mb. i will need to have multiple user access. (no more than 10 users at a time) i need to convert this ...

How to auto activate WordPress widgets? (New Widgets_API WP_Widget class)

Hello, I gave up on this finally. I am developing something on WordPress 2.8.4. I am impressed by the ease of new widgets API which allows you to use extends WP_Widget and create widgets that have multiple instances easily. But I am facing a problem. How can I auto-activate the widget on theme activation? I've tried to use: add_actio...

datetime in php

i am devloping a quiz site and there is time for x min to answer the quiz. So when user clicks on start quiz link the starttime(current time at this instant )is recored in session .Also the endtime (start_time+ 30 min ) is recored in session and every time he submits a answer the current time is compared with the quiz end time. Only if ...

Describing PHP functions efficiently

How can you describe the parameters and return type (getter/setter) of your PHP functions? I need to tell my moderator the return type and list the parameters for each function. I have hundreds of functions so this is becoming problem, since I need to do this for every single revision. I use at the moment the following procedure ack-...

Lighttpd + PHP + FCGI

Hello. I have a problem with Lighttpd, PHP and CGI. I use OpenSUSE.10. I have builded lighttpd (version 1.4.23) and php (version 5.3.0). This is lighttpd build command lines: ./configure --prefix=/home/gosh/Desktop/web_server/lighttpd_native_installed --without-zlib --enable-ssl --enable-openssl --with-openssl=/home/gosh/Desktop/we...

How to correctly reference multi-dimensional arrays?

I have the following array called "$order" (as printed out by "print_r"): stdClass Object ( [products] => Array ( [0] => stdClass Object ( [data] => Array ( [attributes] => Array ( [ID] => Array ( ...

How to make a globally accessible object

Hi i have a little collection of classes some of which should be globally accessible. I found something similar in Zend_Registry, but reading its code i cant understand how a call to a static function could return an initialized instance of a class... i need to do something like: <?php //index.php $obj = new myUsefulObject(); $obj->lo...

backing up mysql in wampserver

how can i backup my 10mb mysql database? i dont think wampserver supports mysqldump. i want to migrate it to a webserver. ...

creating db with myphpadmin

i have setup mysql on a webserver. i have an 8mb file with sql code to create tables. im using the phpmyadmin IMPORT FILE feature, but for some reason it gets stuck and gives me the 500 Internal Server Error The server has encountered an internal error or misconfiguration and was unable to complete your request. . what is the best way ...

Running SH script with sudo for PHPdoc

How can you run the following script in generating docs by PHPdoc? #1 sudo -code sudo source makedoc.sh I get no command source #2 without sudo The problem is that sudo does not have the command source. I tried to fix the problem unsuccessfully by changing the persmissions of ~/phpdoc/phpdoc to 777 and then running source makedo...

Calling JavaScript with PHP

I want to call a PHP function when pressing on a button, sort of like: <?php function output(){ // do something } ?> <input type="button" value="Enter" onclick="output()"/> I tried to make something like: <input type="button" value="Enter" onclick="test.php?execute=1"/> where test.php is current page and then by php <? if(iss...

BelongsTo problem in cakephp and html select, i can't understand how to do that

Simple question by a cakephp noob: i have two models, Player and Team. Team has an id (int) and a cool_name (varchar). Player has an id (int), a cool_name (varchar) and a reference for the team table, team_id (int). Cool_name instead of name because i don't have tables in english, so i can't use the field 'name'. So, a team hasMany ...

which file location does myphpadmin look in?

for this statement: mysql <my_db_name> -u<user_name> -p<password> <mysql.sql where does mymphpadmin assume mysql.sql is located in? ...

Extracting Urdu/Arabic phrases/sentences from a string

I want to extract Urdu phrases out of a user-submitted string in PHP. For this, I tried the following test code: $pattern = "#([\x{0600}-\x{06FF}]+\s*)+#u"; if (preg_match_all($pattern, $string, $matches, PREG_SET_ORDER)) { print_r($matches); } else { echo 'No matches.'; } Now if, for example, $string contains In his books (s...

Changing the template code produced by Zend_Tool

This is a silly little thing, but I was just wondering whether there was a way to change the style of the code produced by the Zend_Tool? Specifically, the bracket style? // from this: class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { // to this class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { Obviously it'...

Solving error messages given by PHPdoc

How can you solve the following error messages given by PHPdoc? I run madedoc.sh by the following command Command sudo ./makedoc.sh I get Error messages PHP Version 5.2.6-3ubuntu4.2 phpDocumentor version 1.4.2 Parsing configuration file phpDocumentor.ini... (found in /usr/share/php/data/PhpDocumentor/)... done Maximum memory ...

Finding correct format for PHP comments in Doxygen

Which is the correct doxygen format for PHP comments? #1 /** Create HTML for tags * @param string @tags */ #2 /** * Create HTML for tags * @param string @tags */ #3 /**! Create HTML for tags * @param string @tags */ ...

3rd party website authentication libraries (like openid)

I'm building a website that will require user registration and logon. I would like to use the facebook connect to let people create a basic account and to log on without having to create a local account themselves - and let them fill in more profile details when they want to. What other 3rd party authorizations systems are there? Clear...

How to implement database connection pool in PHP?

Possible duplicates: http://stackoverflow.com/questions/39753/connection-pooling-in-php and http://stackoverflow.com/questions/830707/php-connection-pooling-mysql I used to restore connections in $_SESSION. but found it not good. ...

MySQL Int Removes 0

Hi I have got a column in my database which is set to Int. But my data always starts with a 0 so whenever I add a new record, it strips the 0 off and I don't want it to do that incase the first character has to be a 1 at some point. How can I overcome this issue? Is the best way to use VARCHAR any then validate using PHP? Update I...