I built a php site that is hosted with an ISP. A friend who is a designer is supposed to edit the page content. There's an area on the page that is open for page content, but most of the outer "wrapper" is built with include() files.
When she opens the files in design mode, everything is broken. I tried to set up a test server in DW, bu...
I'm trying to connect to gmail pop server from a phplist installation and it fails, but i'm not sure whether my webhost opened port 995 or not. They say they have opened it, but i'm in doubt. Is there a way i can check it from a php script? They are running php 5.2.0 on a windows server, though i'm not sure what OS is that. phpinfo() sa...
Hello,
Is there a way to get the the current position of an array from within a nested array ?
I have a php script that has a for loop which cycles through an array, with in this is an nested loop which cycle through a sub array.
I can use pos() to get the position of the child array, is there anyway of getting the current position of...
Hi
I have some JavaScript code in my php website.
This code uses jQuery, and builds a < select > menu using ajax calls.
Here is the code
sel.append('<option value="' + data[i].id + '">' + data[i].nombre + '</option>');
And this gives me the following warning
line 240 column 82 - Warning: '<' + '/' + letter not allowed here
Does any...
So I've set up testing in my ZF 1.9.5 application thanks to this tutorial, I am able to test my controllers, now I want to create a test for a form. However, I'm having the problem that PHPUnit can't find my form.
Fatal error: Class 'Default_Form_AccountProfile' not found
I'm extending PHPUnit_Framework_TestCase instead of Zend_Test_...
Hi
I'm working on a Joomla site, and I need the front page to look slightly different from the rest of the pages, but not enough to warrant the use of two themes (it's a pain to have to update two stylesheets and two sets of images every time I want to make a small change).
My thoughts are to throw in a little test in the index.php of...
PHP appears to be giving different hash values when I use php -r <code> on the command line and when I execute the file with php <file>, php -f <file>, or run the code inside Apache.
For instance, a SHA1 usage on command line using -r:
$ php -r "print sha1('$1S*90');"
77cd8b48ceca53e018f80536b0a44c5b6710425f
When I try the same with ...
Hello,
I was attempting to
encrypt de cookie data with md5, but I can not validate the hash back.
It has got to do, with the fact that cookie_data is a serialized array, because normal stringvalues work ok.
It's actually from a codeigniter class, but it does not work??
Does anyone know what the problem might be?
$hash = substr($s...
Hi,
In my application I am loading xml from url in order to parse it.
But sometimes this url may not be valid. In this case I need to handle errors.
I have the following code:
$xdoc = new DOMDocument();
try{
$xdoc->load($url); // This line causes Warning: DOMDocument::load(...)
// [domdocument.load]: failed to op...
There's something I don't fully understand about node cloning with the PHP's DOM api. Here's a sample file that quickly duplicates the issue I'm coming across.
$doc = new DOMDocument( '1.0', 'UTF-8' );
$root = $doc->createElement( 'root' ); // This doesn't work either $root = new DOMElement( 'root' );
$doc->appendChild( $root );
$doc...
Open Source PHP script for HTTP streaming?
Does anyone know something about such things?
...
I have a MySQL database that has a few very simple tables.
I would like to find an app (implemented in Perl, Python or PHP) that will do the following:
Point the app to a database table, and it automatically retrieves the table's schema from the database.
It then generates an HTML view of the table's data. The data is displayed as a ...
I'm using PEAR's Mail package to send email from my script. I'm pretty sure I have everything connected and declared properly, but when the script runs, it just connects then immediately disconnects to my Mail server without actually sending the email.
From my Postfix logs:
Nov 18 16:15:49 mailer postfix/smtpd[30346]: connect from xxx-...
I'm trying to set up a PHP script to read a handful of MySQL tables from database A and then insert them into databases B and C. It's a really simple scenario - the tables being copied over can even be emptied or dropped before they have values inserted into them. All the databases are on the same server, and I don't need to preserve t...
Is it possible to create a 1 pixel shadow image (say shadow.jpg) in photoshop, and then with PHP repeat that shadow just beneath or on the side of an image, for whatever the width or height of the target image is?
Example: If my image is 640x420 then shadow.jpg will be repeated just beneath this image 640 times, thus creating a drop sha...
I'm trying to get this to work, but no luck. It's 3am, so that may be the problem. What am I missing here?
I'm trying to insert some data via jQuery to a local MySQL table. If I run save.php on its own, it inserts a blank row in the DB, so that works. Any ideas?
**index.php**
<html>
<head>
<link rel="stylesheet" type="text/css" hre...
I am looking for documentation/tutorial for Inotifier as I need to implement file notification logic in PHP.
...
So I have an interesting problem: I have a string, and for the most part i know what to expect:
http://www.someurl.com/st=????????
Except in this case, the ?'s are either upper case letters or numbers. The problem is, the string has garbage mixed in: the string is broken up into 5 or 6 pieces, and in between there's lots of junk: unpri...
I am working on a document that requires a user to upload a Microsoft Word Documents.
Apart from checking the file extension to be .doc or .docx, is there any other way i can verify that the uploaded file is actually a Microsoft Word Document and not any other file renamed to a .doc or .docx extension.
Thanks in advance.
...
I'm trying to get interactive debugging working with a Zend Framework application and Xdebug, using MacGDPp as the client debugger. I'm running to some problems setting breakpoints and was hoping
Someone could solve my specific problem
Someone could give me a high level overview of how this is supposed to work so I can track down the ...