php

Why can't I use shell_exec from a PHP script on a network share in IIS?

I have some PHP scripts that reside on a network share. For argument's sake, let's call the share \\nas\dev. I have a Web Site on \\w2k3dev\ set up in IIS6 that uses \\nas\dev\ as its home directory by setting "A share located on another computer". Some of my scripts use shell_exec to execute functions on the server and return results t...

Looking for a lean WYSIWYG inline editor for CMS projects that includes an image upload feature?

Hey guys, I am looking to find a lean WYSIWYG inline editor. The main required feature is image uploading. A simple way to upload an image to the server and use it in the content being editted. I have come across a whole bunch of editors but nothing I liked so far. I am looking for something open source and free. So far I have che...

What is the fastest and best PHP IDE on Windows?

I've tried a few PHP IDEs, but am still searching for the fastest one. All Java-based IDEs are too slow. I have 2 computers to work with: my home PC which is too fast, and my laptop which is good but can't handle heavy software. And I have to work on them both, so I'm looking for the best free IDE which is fast. I'm not talking about t...

php fail to open a sqlserver 2000 database

I can use the sql server management studio to open a sqlserver 2000 database, but I can not open the same database in a php page using the same user and password. what is the problem? if(!$dbSource->open("192.168.4.241:1433","sa","sa","NorthWind")) { echo "Fail to open the sql server 2000 database"; } ----------------------- ...

jQuery - Creating a dynamic content loader using $.get()

Hello everybody! (hello dr.Nick) :) So I posted a question yesterday about a content loader plugin for jQuery I thought I'd use, but didn't get it to work. http://stackoverflow.com/questions/2469291/jquery-could-use-a-little-help-with-a-content-loader Although it works now, I see some disadvantages to it. It requires heaploads of file...

symfony save submitted form to database

Maybe I am missing something, but in symfony examples, in form submission action there's nothing which indicates form data is saved to database. (link). How can I save everything to db? Example from the link: public function executeSubmit($request) { $this->forward404Unless($request->isMethod('post')); $params = array( 'name'...

How to Run PHP Pages in CAKEPHP?

i configured database in xampp. but i don't know no how to run php pages in cake php . ...

Getting the day from a Unix timestamp (PHP)

How do I get the day (1-7) from a Unix timestamp in PHP? I also need the day date (1-31) and month (1-12). ...

Best approach for a scalable PHP (AJAX based) chat system

Hi, I'm building a chat system for a company and I'm wondering as to what the best way to build the system would be? The current setup we have is a Nginx HTTP Server with PHP and Memcacheq (as a message queue that appends the chat messages to the user's own queue). We then poll the Nginx server (through a Comet style request) and query...

How can I display a list of characters that fail to match a regular expression?

For example, if I'm doing some form input validation and I'm using the following code for the name field. preg_match("/^[a-zA-Z .-]$/", $firstname); If someone types in Mr. (Awkward) Double-Barrelled I want to be able to display a message saying Invalid character(s): (, ) ...

Routing to a different URLs based on post type

What would be the best way to set up my routes so different types of posts have different URLs? For example, regular posts are /posts/slug while featured posts are /featured/slug Both link to the same controller and action /posts/view/slug. I experimented with different ways of doing this but with little success. Currently my link par...

php script to call gpg commands

system() call in php used to call external program .How can i call gpg (gnupg commands) for encryption through php script. ...

Where can I find a web-project "security checklist?"

I'm looking for a complete list of security guidelines for programming and deploying PHP web sites and applications on an Apache (Linux) server. Basically, a "security check list" to run through before finishing a project. I.e., Cross Site Scripting Cross Site Request Forgery Sanitize form data that goes into database Disable register ...

server performance: multiple external connections and performance

I am creating a php script that requires the server to make several cURL requests per run. I'll be running this script through cron every 3 minutes. Im looking to maximize the amount of cURL requests I can make in a 24 hr period. What I am wondering is if it would be better from a performance standpoint to get a dedicated server, or se...

PHP time math calculations

Hallo, How can I calculate a current time moment + exactly one week? The same with month. Thanks. ...

(php) regexto remove comments but ignore occurances within strings

Hi there, I am writing a comment-stripper and trying to accommodate for all needs here. I have the below stack of code which removes pretty much all comments, but it actually goes too far. A lot of time was spent trying and testing and researching the regex patterns to match, but I don't claim that they are the best at each. My problem...

PHP coding question?

Does the following code below do the same thing and if so which one is better when coding? And is there a name for when PHP code is missing curly brackets? The PHP code. <?php if (isset($_POST['email'])) { echo $_POST['email']; }?> <?php if (isset($_POST['email'])) echo $_POST['email'];?> ...

How do I extract specific data with preg_match?

I'm looking to extract values from a whole load of html (i've just trimmed down to the relevant data), there are multiple 'select' elements, and only want to extract those who's 'name' element matches the name 'aMembers'. So the resulting values I would like to retrieve are 5,10,25 and 30 (see below) how can I achieve this with preg_matc...

Replace a div content with PHP

hi everybody, yesterday, I posted a question about "Hom to change a DIV id with a php function" and someone found the right answer with a regular expression. The problem is that I wanted to use this answer to aplly the method on other same problems. But, as I'm very bad at regular expressions, I couldn't. So the problem is that I upl...

<? ?> tags not working in php 5.3.1

Hi All I just installed php 5.3.1 in my linux server and now my old work which i used to write with tags is not working at all.. Please help me out.. How can i resolve this?? ...