I have an article that I want to publish on my Joomla! site. Every time I click apply or save. I get error 500 - An error has occurred! DB function reports no errors. I have no idea why this error comes up, al I can think is that it's a server error.
I'm using TinyMCE to type articles together with Joomla! 1.5.11.
Updated: I turned o...
I'm writing a PHP server and the client is sending data in a specific character encoding. Now, I want to tell the server to read and write data in this same character encoding set.
How should I specify the character encoding set for PHP's socket_read and socket_write methods?
...
Hello,
I have a report say,
Sno Address Name Age
when users click on Print button, they should be able to print the respective report
Can anyone help me how can i handle this in php, as i generate this report in php
I get all the info from table(MySql)
Thanks for the help
...
I'm trying to insert a date ("This is a string") into a postgres database field. I'm getting the following error
ERROR: invalid input syntax for type timestamp: ""
Here is my code
$date = '2002-03-11';
$query = 'INSERT INTO dates(date) VALUES('.$pdo->quote($date).')';
$pdo->query($date);
I have absolutely no idea on how to do thi...
Hi,
I need a binary/script (php) that does the following.
Start n process of X in the background and maintain the number processes.
An example:
- n = 50
- initially 50 processes are started
- a process exits
- 49 are still running
- so 1 should be started again.
Please, this is urgent.
Thanks! Michael
P.S.: I posted the same questi...
Hi,
I'm Using ZendFramework-1.0.4 and I don't have any idea how does it wrap the $_FILE global-variable.
Is it a good idea to use it directly in my Controller?
Bcus I need to Upload an image file.
...
I've got a bit of an awkward problem.
Normally when putting stuff in a database, this will be saved in the way it is.
So, if the saved stuff is:
<?php echo "hi!"; ?>
This will just be output as 'hi!' when called.
However, in my case I'm saving plain text into a database. I'm not doing any verifying to check for these codes and I've t...
Doing some code reviews lately I came across a number of classes that have significant number of static methods in them... and I can't seem to grasp why? Hence my question:
What are the best practices regarding using static methods in PHP?
When would one want to use them and when would one shouldn't use them?
What are specific differe...
For some strange reason I cannot figure out right now, NoEmbed.php fails with a fatal error when trying to include a file. include path is set correctly, I've verified that like below (right before the require_once directive in NoEmbed.php):
$s = ini_get('include_path');
$a = explode(':',$s);
foreach($a AS $path) {
echo $path;
i...
I am writing a fairly complex PHP applications where a single user action can trigger changes in many other sub-systems, and I'm contemplating using an observer pattern. However, I am wondering if I have to re-create all the objects involved.
Is it possible to while serializing objects to store their relationships? For example
$equipm...
Hi,
considering that the variable only can be String fetched from an HTML Form (input-text, textarea).
...
I'm trying to write a script in PHP5 that will:
read in an XSD
let the user give an element/tag name which will serve as the context
output a list of elements allowed within that element/tagname based on the XSD
So far I'm only able to see solutions for using XSDs to validate XML files. Anyone done something like this before?
...
Hello,
We're moving from php4 to php5, and we get this warning on one of our developers machines, but not in our php5 test setup:
Deprecated: Call-time pass-by-reference has been deprecated in C:\Workspace\Prelive\www\includes\filename etc..
The code seems to be the same in both environments, and the php.ini on the test environment ha...
Hello,
I'm using Zend Framework 1.62 (becuase we are deploying the finished product to a Red Hat instance, which doesn't have a hgih enough PHP version to support > ZF1.62).
When creating a Form using Zend Form, I add a select element, add some multi options.
I use the Zend Form as an in-object validation layer, passing an objects val...
I seem to be having a problem running AMFPHP under SSL in our development environment.
I created a self-signed cert under CentOS and got everything working, but whenever I go to the page in Firefox I get warned that the certificate is self-certified and therefore cannot be accepted.
This then seems to affect the AMFPHP calls from flas...
I've just upgraded to PHP 5.3 and started supporting an old website for a new client. It seems to use rather odd PHP code which I've not come across before.
Whilst trying to access $_GET or $_REQUEST variables, the developer has used the following: ${"variable_name"}
I get notices generated due to undefined variables (presumably becaus...
Greetings all,
I have an application when I am posting data on a fairly regular interval. I have one set of code which was developed for VB on the local side and classic ASP on server side, now I would like to change the servside to PHP.
The original code uses the xmlHTTP object to post xml data to an asp webpage, worked like a charm.
...
The following code throws an error in PHP 5.2.9 after submission, but not on the original load.
Error: Fatal error: Only variables can be passed by reference in /home/golfcom/public_html/test.php on line 12
File:
<?php
include('connection.php');
$result = $dbc->query("SELECT subdivision FROM Residential");
$search['subdivision'] = arra...
I have an URL http://test.com/test?xyz=27373&page=4&test=5 which I want to tranform by replacing the page=4 through page=XYZ
how can I do that with preg_replace?
...
is there any function in php through which we can fast the execution time of php script
...