I have a site using cakephp1.2.8 running on a ubuntu9.04 server. It works fine with 16M memory_limit. Now I moved the site to a new CentOS5.5 VPS. Then the server starts to show errors like this:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 342095888 bytes) in Unknown on line 0
It displays pages cor...
hi All,
what is the best module for creating a paid listing in joomla? Im kinda newbie in joomla and trying to create a paid listing in my website.And i want the when the user subscribed to the paid listing his/her or her post will be pending before and reviewed by the admin before posting it to the website.
thanks!
...
I've got some HTML that looks like this:
<tr class="row-even">
<td align="center">abcde</td>
<td align="center"><a href="deluserconfirm.html?user=abcde"><img src="../images/delete_x.gif" alt="Delete User" border="none" /></a></td>
</tr>
<tr class="row-odd">
<td align="center">efgh</td>
<td align="center"><a href="deluser...
I've inherited some legacy code, within which if I turn on:
error_reporting(E_ALL);
I get literally hundreds of messages all over our site, all of them like:
Warning: include_once() [function.include]: Failed opening '../inc/variables.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/xyz/xyz/xyz/payment.class...
Hi,
I have used $_SERVER['HTTP_REFERER'] variable in my application (used PHP).
On Firefox above variables is wokring. But i observed that $_SERVER['HTTP_REFERER'] is not working on Microsoft Internet Explorer 8.
I also got to know that HTTP_REFERER variable doesnt work on MSIE8 and MSIE7.
Please give me your suggestions, how to use $_...
There are plenty of tutorials and step by step guides out there on the internet, but they give mostly examples which you can run in the computer.
Is there a good separate set of problems that beginners can try to solve themselves. If existing solutions are available, even better.
Update
To put it more clearly, is there any resource onl...
I am trying to get all the users and their associated groups from an Active Directory server, using a LDAP query. Apparently, Active Directory doesn't give me the primary group of the users. For example, this search:
(objectclass=user)
produces this result:
# Test User, Users, sub.domain.net
dn: CN=Test User,CN=Users,DC=sub,DC=domain...
I know this is not programming related question so to speak, but since we are programmers and we might use Netbeans for PHP development.
I am wondering how can I get in Netbeans interface with search, macro or some other way all lines that start with echo or print_r aka as debug lines.
...
For example I have a list of words: men's package, moment, immensely
How can I search in mysql sample text: "men's" and return only "men's package"
I'm using this
$str = str_replace("s", "%s", $str);
If I search for "men's",
it will only show: men's package
but when I search for "mens"
it will also show: men's package, moment, immense...
Given in routing.yml:
products:
url: /products/*
param: { module: products, action: index }
How to fill wildcard part using url_for helper? I mean somthing like:
<?= url_for('products/index?wildcard=somthingRandom') ?>
that generates URL:
/products/somethingRandom
...
I am creating a webpage with PHP/MySQL, and each page is in its own .php file.
How should I organize the addressbar, when changing the viewing page?
I have thought of two different ways to solve this:
1) www.mywebpage.com/?page=REFERENCES+pageid=GUID_TO_USE_FOR_DB_LOOKUP
2) www.mywebpage.com/references.php?GUID_TO_USE_FOR_DB_LOOKUP
...
I have a LAMP setup running PHP 5.2.6-1 with the Suhosin Patch (0.9.6.2) and Zend (2.2.0) with APC enabled for use with a file upload script using an ajax cal to get the status and generate a progress bar.
Everything appears to be working, the file uploads perfectly and is displayed correctly on the website or if you download it, but it...
I am running Dreamweaver CS5.
For some reason, when I 'save' my PHP script it tries to run it on the server. This is causing a lot of erroneous inserts into the database and I would like to disable this option but I don't know how.
Cheers
...
Consider a normal PHP image upload functionality (not using AJAX) and there occurs this problem of large image upload failing occasionally - less frequently on one test server and more frequently on another test server. Assuming the debugger has not yet started debugging the problem and there are no file/folder permission issues, how to ...
Hi,
I'm having problem on using soap
I get an error:
Fault code: soap:Server
Fault string: Server was unable to process request. ---> ERROR: Could not authenticate user.
How to fix this? I dont know why this error appears. the last time i check my code its ok but now i got that error.
thanks
...
I am having a little play with an ORM but I am struggling to get off the starting blocks. I am familiar with Zend_Db and was hoping Doctrine would work in a similar way but with more flexibility.
I've followed the various tutorials, to integrate Doctrine with Zend Framework, which are available. All these tutorials more or less say the ...
Hi,
I need some help in PHP to create short urls just like StackOverflow creates when we comment any long URL in comments on a question.
StackOverflow shortens http://www.noupe.com/how-tos/10-ways-to-automatically-manually-backup-mysql-database.html long url to short urls like this noupe.com/...
I require similar kind of functional...
PHP gives a different IP address for my site from $_SERVER['SERVER_ADDR'] than other sites see when I access them through cURL (or file_get_contents, or whatever). I know this because I had my site download whatismyip.com and it gives something different than that server variable.
Adding to this annoyance is the fact that the outgoing ...
function getChnRandChar($length) {
mt_srand((double)microtime() * 1000000);
$hanzi = '';
for ($i = 0; $i < $length; $i++) {
$number = mt_rand(16, 56) * 100 + mt_rand(1, 19);
$tmpHanzi = chr(mb_substr($number, 0, 2) + 160);
$tmpHanzi .= chr(mb_substr($number, 2, 2) + 160);
$hanzi .= mb_convert_e...
I've been looking at Redis. It looks very interesting. But from a practical perspective, in what cases would it be better to use Redis over MySQL?
...