Iam doing parsing and for that i need an error handler that should send mail only when a page is not opening up or is going on not found or is forbidden or something.
What iam using currently is this :-
function customError($errno, $errstr, $errFile, $errLine)
{
switch ($errno)
{
case E_ERROR:error_log("ERROR:in $errFile...
So I need to connect to a mssql server via Windows Authentication from a Unix server. Here are the obstacles:
The db admin created a service account but made it Windows-Auth only, meaning I can't pass the username and password directly to the server to connect.
The admin also added my host's server to the firewall so that it would only...
i used javascript and php script as mixed. i got a parse error
this is the code
<script language="JavaScript1.1">
var photos=new Array()
var which=0
<? for($i=0;$i< count($productdata2);$i++)
{
foreach($productdata2 as $row)
{?>
// the error occured at this line
photos[0]=<?=base_url().'uploads/'.$productdata2[$i]->image;?...
How can i fetch all data from any table of a test DB and DUMP it on the production db in same tablename(structure)? in Mysql using PHP code?
Please help me..
EDIT
I need PHP to do this for me using MySQL Queries
...
In my query:
$cselect = mysql_real_escape_string($_POST['cselect']);
---------------
---------------
$sql = sprintf("INSERT INTO content
(id, catID, title, abstract, body, status, published, date, description_meta, keywords_meta)
VALUES ('', '%s', '%s','%s','%s','%s','%s','%s','', '' )", $cs...
Hi,
I have a config file, in etc/ called 1.conf
Here is the contents..
[2-main]
exten => s,1,Macro(speech,"hi {$VAR1} how is your day going?")
exten => s,4,Macro(dial,2,555555555)
exten => s,2,Macro(speech,"lkqejqe;j")
exten => s,3,Macro(speech,"hi there")
exten => s,5,Macro(speech,"this is a test ")
exten => s,6,Macro(speech,"testing...
I am trying to send a SOAP message to a service using php.
I want to do it with fsockopen, here's is the code :
<?php
$fp = @fsockopen("ssl://xmlpropp.worldspan.com", 443, $errno, $errstr);
if (!is_resource($fp)) {
die('fsockopen call failed with error number ' . $errno . '.' . $errstr);
}
$soap_out = "POST /xmlts HTTP/1.1\r\n...
I am trying to insert messages to a function
function addMessage($item) {
if ($result) {
$message = '<p class="ok">
<span> Item added </span>
</p>
';
header("Refresh: 2; url=?page=$item");
}
else{
$message = '<p class=not><...
Hi, i want to ask, what is the meaning or difference between these two line?
if( preg_match_all('/\#([א-תÀ-ÿ一-龥а-яa-z0-9\-_]{1,50})/iu', $message, $matches, PREG_PATTERN_ORDER) ) {
if( preg_match_all('/\#([а-яa-z0-9\-_\x{4e00}-\x{9fa5}]{1,50})/iu', $message, $matches, PREG_PATTERN_ORDER) ) {
and what does the number 3 mean in this l...
I am doing some debugging in php and I need to take a look at the full headers sent to the server in including the multipart form-data information stored in content disposition.
However apache_request_headers() doesn't return that information.
Any clues?
I am also happy to look at a non php solution if possible
...
I need a regular expression which replaces a string like this
"Myname _MySurename" with "Myname"
that means i just need Myname, so _MySurename should be cut.
i tryed something like "/_*/" but that replaces just the _ (underscore)
how can i do that in PHP ?
...
I'm trying to generate email messages. The recipient's email address and name are specified by a user. What is the correct way to do this with PHP:
$to_header = "To: $name <$email>" # incorrect!
I already use a decent method for validating the email addressess (let's not go to that now...), but how do I properly encode $name with eg. ...
hi, in PHP.INI, I can set the variable "error_log" and it is currently set to "error_log", which manes one file of that name in each directory
Do you know ... if I set it to "public_html/error_log" - will I get only one single error log file? Any other way to do so? I really just want a single site-wide error file to check, rather than...
Hi everyone. I'm trying to run a php-script on a scheduled basis. So I'd thought crontab was a good idea. The server I'm using is on Linux which I'm not that familiar with. So the problem I'm having is, I don't know how make the script executable from php. I need to reference the script, or put it into a folder that can run php from the ...
Does the symfony cache system handle ext2 32000 files in the same directory limitation ?
I have 80000 users and i want to cache their profiles but do symfony cache system handle the ext2 limitation ?
i'm also posting for the others who will face the same problem.
...
how i can duplicate one element from array:
for example, i have this array:
Array
(
[LRDEPN] => 0008.jpg
[OABCFT] => 0030.jpg
[SIFCFJ] => 0011.jpg
[KEMOMD] => 0022.jpg
[DHORLN] => 0026.jpg
[AHFUFB] => 0029.jpg
)
if i want to duplicate this: 0011.jpg , how to proceed?
i want to get this:
Array
(
[LRDEPN] ...
Hellow,
I have a database where you can select articles etc, users have an account, it's all in mysql and php (i guess you don't need that code).
What i was wondering was how to write a script that allows users to pay online for the articles they selected?
It doesn't need to be any code, just ideas / hints / tips / ... (that are doable ...
Has anyone an idea how pipebytes.com works ? I need to implement similar system in PHP and I do not know how to start. The only thing I know is that it is possible to implement it :). Please help!
...
Hi,
I have a product database and I am displaying trying to display them as clean URLs, below is example product names:
PAUL MITCHELL FOAMING POMADE (150ml)
American Crew Classic Gents Pomade 85g
Tigi Catwalk Texturizing Pomade 50ml
What I need to do is display like below in the URL structure:
www.example.com/products/paul-mitchell-...
I'm getting:
Warning: ldap_start_tls() [function.ldap-start-tls]: Unable to start TLS: Connect error in /var/www/X.php on line Y
/etc/ldap/ldap.conf:
TLS_CACERT /etc/ssl/certs/ca.crt
ca.crt is the CA which signed the LDAP server certificate. The certificate on the LDAP server is expired and I can't change it.
...