php

Fatal error: Class NAME not found in (....PATH) ?

Hi What may be the problem if i get the following error. while i am extending a class i got this error example: class ModuleUser extends AbstractModule Fatal error: Class AbstractModule not found in (....PATH) ? I have done most of the possibilities... But i can't resolve the problem. any help will be thankful thanks n ad...

php parse urls with multiple variables with get request

I'm sending a php script multiple urls (about 15) at once, all containing about 5 url variables. In my script, I'm parsing the chunk of urls into individual ones by splitting them with two backslashes (which i add upon before to the script), and then curling each individual url. However, when I run my script, it only accepts a url up to ...

file uploaded via php: no such file or directory

hello i'm working on a website wherein the users can upload images (uses php 4.3.11). the files are uploaded with no problem as i can see them in the upload directory and i don't get any error message, but when i try to access the uploaded files via ftp, i get an error: no such file or directory. sometimes, i am able to access the file ...

Better Understanding of Web Proxies for php and javascript

I am trying to develop a analytic s project. My goal is to let a owner of x-domain be allowed to copy and paste a small snippet of javascript includes on to their site, from my server. That will be able to analyze the end users experience on their site. Given that my server is php, and I will sending and recieving data larger then the b...

PHP exec() command: how to specify working directory?

My script, let's call it execute.php, needs to start a shell script which is in Scripts subfolder. Script has to be executed so, that its working directory is Scripts. How to accomplish this simple task in PHP? Directory structure looks like this: execute.php Scripts/ script.sh ...

How can i build dynamic organizational chart ?

Hello, I'm trying to build an dynamic organizational chart with php. Do i need to build it myself or is there some tools for that? specification: all the positions in the company are predefined in the org chart, we only add persons in the correspondent position. I need your suggestions. Thanks. ...

Lightweight development web server with support for PHP v2

In line with this question: http://stackoverflow.com/questions/171655/lightweight-web-app-server-for-php The above question has been asked numerous times and answered exactly the same in all the cases I've found using google. My question is similar to a degree but with a different desired goal: On demand development instances. I have ...

Imagemagick thumbnail generation with php - using -crop

Hi there, Long ago I created a small library for resizing images using imagemagick through system(...) because I did not feel that the build-in imagemagick functions for PHP were sufficient. However, recently I had to port this to a symfony project and I chose to use sfThumbnailPlugin (if I remember correctly). This unfortunately didn'...

Out of memory error

hi, i have this site which keeps on throwing out of memory error based on the error logs. sad thing is i cant reproduce the OOM error both on dev site and production site. i checked the logs and found out that this only happens when bots crawl the pages throwing the OOM error or if the pages are accessed from google search results. i...

how to make ajax submit redirect?

in php, if i submit via ajax, how to redirect to other page when result comes back? ...

Parsing data (PHP, MySQL)

Hi guys! I have a file with data in the following format: <user> <fname>Anthony</fname> <lname>Smith</lname> <accid>3874918</accid> </user> <user> ... </user> I'm trying to parse this data and store it to MySQL database with the follwing fields: fname, lname, accid. Now the problem is how to determine <user> and </...

Facebook Edit Events - Unknown Error returned

Hi, I'm hoping someone can help me. I'm having problems getting the Facebook events_edit function working. I can create events and cancel them no problem but when ever I try to edit them I get an "unknown error" message returned. The code from the test console API is below (this is using the sample event information from the event_ed...

php mysql_insert_id on multiple rows?

Hi, Is it possible to get the auto incremented ids from a query which inserts multiple rows? eg: INSERT INTO table (col1, col2) VALUES (1, 2), (3, 4), (5, 6); Alteratively, is there a way to find the NEXT auto increment value WITHOUT inserting anything into the table? Thanks ...

php how to check a string for more than 5 consonants in a row

As a spam filter I want to block any comments that contain djgalkgjlkdg or any other excessive amount of consonants in a row. I thought of maybe having an array of consonants and then check the comment with it, but seems too long and cumbersome. Do you know of any way I can do this without guzzling memory? ...

Extract Company Address from a string

Hi i need to extract address from a string $string ="some text 9 th pizza tower 78 main Chennai 600001. and other information may be phone number etc"; From $string i want to extract only "9 th pizza tower 78 main Chennai 600001" This Address format is not constan it may in two types one is string variable another one is like this ...

Php-Flash communication over sockets

Good time of the day, dear developers! I am not any kind of network programming pro, but it happened that I have faced necessity to develop socket-server on php (no way for using Java) for flash multiplayer browser-game (standard features like locations, team battles, etc). The main problem is that TCP is point-to-point protocol and ...

how to paginate lines in a foreach loop with php

Using the following code to display a list of friends from my twitter profile. Id like to only load a certain number at a time, say 20, then provide pagination links at the bottom for First 1-2-3-4-5(however many divided by limit) Last $xml = simplexml_load_string($rawxml); foreach($xml->id AS $key => $value){ $profile = simplexml_load...

Combinations, Dispositions and Permutations in PHP

What is the most efficient way to generate all the combinations, dispositions and permutations of an array in PHP? ...

php google analytics question about redirect with 'header'

Hay All. I'm currently working on a 'checkout' system, the actual payment and stuff is done by a third party. When a user checks out using a form it sends all the GET data to some other site, lets call this 'checkout.com'. So the query string is 'checkout.com?var=1&var2=2'. What i want to do is put a page between my form and this call...

Get value from links with jquery

Hello. I have a div box with some images that the user can click. When the user clicks the image i want a ajax call that will provide me with the product images from that provider. Like this: <div id="phones" style="display:none;"> <a href="#" value=1 id=HTC class=vendorLinks> <img src=/images/vendors/htc.png> </a> ...