php

404 redirecting on include file

Hello all, I have added a 404 page and included the following in the .htaccess ErrorDocument 404 http://www.game-plan.net/404.php For some reason I'm not aware of, when i process forms, it doesnt want to do that, it wants to redirect to a 404 page. Is this anything common? Something I dont know that maybe someone has come across befor...

Benefits of creating a custom mvc framework

Would creating a custom php mvc framework from scratch be completely pointless for a small digital agency? I have heard recently from a friend that His colleges are infact spending time on such a project within their agency. Their argument against using another such as cake or zend being that they come with so many unused features and t...

passing parameters in xml

i'm trying to implement paging in xml using this code and got around to making it work. while it works perfectly, there is a small issue, that when i click on the NEXT button, it keeps reloading the page with the same initial records. it does not take the user to the next page. i came across this link wherein the poster had a similar ...

eval() and PHP errors

Hi I have a eval function like this if(FALSE === @eval($code)) echo 'your code has php errors'; So if the code has synthax errors it will return that message. The problem is that if within the code you have something like: require_once('missing_file.php'); it will just break the page, without my nice error message :( Is there ...

Using custom classes in Kohana 3

Hey, I'm creating a Call of duty 4 Server Watcher in Kohana 3, and I had created the basic classes for it before: A static Socket class (for handling basic network commands) A Cod4Socket class, (which uses the previously mentioned Socket class) that provides wrapper functions for basic commands. What I want is to be able to use said ...

PHP Combining arrays with std class

Hello, This is what I want but cant figure out how to. $a is this array PHP Code: Array ( [0] => stdClass Object ( [id] => i1 [cat] => Test1 ) [1] => stdClass Object ( [id] => i2 [cat] => Test2 ) [2] => stdClass Object ( ...

Missing DLL when run as script

Hi, I'm trying to get a PHP script to run every 30 minutes on my server (Win XP SP3, xampp 1.7.3). To do so I'm running the following script (update.cmd) using the MS task scheduler SET PATH="C:\xampp\PHP" start php.exe \htdocs\update_dashboard.php I am using the oci8 php extension on my webserver, but when I run that script it gives m...

Case-insensitive PSpell spell checking?

I'd like to use PHP's PSpell check function in my program. Is there an option somewhere for case-insensitive checking in pspell_check()? ...

Making C functions available to php

I have a C dll containing functions and enumerations I want to make accessible from php. How can I do it? ...

Loading content on a webpage only when a part of the webpage is displayed on the browser

Hello, in some pages i see when you arrive at the end of the page the page automatic loads new data. For example, some blogs when you get to the end of the page (that only loads 10 articles when you get there), the page load 10 articles more without pressing anything, so the questions will be, How do i execute/triger a php/javascript com...

Magento xml action path

Hello Everyone, I have the following magento XML code: <action method="addLink" translate="label" module="customer"><name>myorders</name><path>chepri/myorders/customer</path><label>Standing Orders</label></action> I was wondering where you would go about coding the handler for the "chepri/myorders/customer" how does it know which pa...

.make versus .profile

Can someone tell me what's the difference between a .profile and a .make file when it comes to drupal install profiles. Which of these do I need? ...

Access GET variables with PHP + .htaccess

I'm developing a website using PHP. My .htaccess has this rewrite rule: RewriteEngine On RewriteRule ^book/([^/]*)\.html$ book.php?title=$1 [L] So the URL that looked like: www.example.com/book.php?title=title-of-the-book turns into www.example.com/book/title-of-the-book.html In a specific case, from another page in the site, I want...

Netbeans code completion spanning class files

I'm trying to get NetBeans 6.8 code completion to work for this. It doesn't seem to do it by itself, but I'm wondering if there's some phpdoc magic or something that may help, since it seems pretty darn good at using that. Take the following two classes: class A { public $B; public function __construct() { $this->B = n...

Compare 2 fields in 2 tables and extract data

How do i compare 2 fields in 2 tables, find a match and use it ? example: table1: data1(id_data1,name,address,phone,account) table2: data2(id_data2,name2) now in php: if (name2.table2 has a matching name in name.table1) { give me the address,phone,account } ...

Virtuemart add to cart only shows in sub-category items

Hi, I'm experimenting with virtuemart, I have the default install without changes, but the add to cart button only shows in sub-categories (eg. Powertools > Outdoor tools). I changed the "Category Browse Page" and "Category Flypage" to be the same for both, but it does not work. Is there a setting I have to change to get it to show? Pl...

PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature

I'm using the pclzip class to autoupdate, and it keeps giving me this error when I try to run an auto update. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature It has never given me problems before. I use the windows 7 'send to compressed zip folder' command. I've rezipped and re-uploaded countless time...

How to use php preg_replace to replace HTML tags

I'd like to change <pre> with <code> and </pre> with </code>. I'm having problem with the slash / and regex. ...

OpenID vs. OAuth

What is really the difference between OpenID and oAuth? They look just the same to me. I should clarify, I'm planning to use them in drupal, if that makes any difference. So I guess I'm bound by whatever module implementations are available in drupal. ...

How do I delete a file that's been fopen'd?

I'm using fopen and it's saving to my shared hosts /tmp directory. I fclose it, but the tmp file doesn't delete. How can I delete this? PHP5, btw. ...