I can not find any answer to this as most problems revolve around a file not existing or a delete process not working.
I have an FTP device where I generate a file with an PHP script. After that, I try to FTP in, get the file and after that, delete it.
This all works fine, I can connect, get the file and save it locally and then delete it. Except for one thing, the ftp_delete() function results in a warning.
PHP gives me the following, when executing the script:
A PHP Error was encountered
Severity: Warning
Message: ftp_delete(): Command okay
I looked up the error code, it means it was successful. And it was because the file is deleted on the FTP device.
So why does this generate an PHP error?
Cheers.
The RFC 959 (FTP specification) mandates that on a successful completion of the DELE command, the server should respond with 250 status code.
The PHP FTP implementation is very strict, yielding a warning on any other code, even if it indicates a success (2xx class).
Your server probably uses some other 2xx code, like a generic 200 Command okay.
Related
I am getting the below error while triggering the file with crone jobs, while it doesn't show any error with manual triggering. Please help whats the logic behind this error. Thanks
Fatal error: Call to a member function find() on a non-object in /home/afghannewscom/public_html/auto/MainProject.php on line 35
Look at the file MainProject.php on line 35 (in editor) and see whats the problem.
the variable $OuterLink is not an object. you may have a look at its definition line.
I also had a similar issue with cronjobs (PHP errors in cronjobs only, running file via browser was fine). The error was caused by incorrect server configuration (it was a shared server, so I couldn't change it). In my case, the fix was pretty easy - I changed cronjob from "php -q /some_file.php" to "curl http://somedomain.com/some_file.php" (you can also use lynx or wget command instead of curl)
I recently re-uploaded all the source files of a web-application and WKHTMLTOPDF stopped working.
I was getting this error from the "bindings" (wkpdf.php):
WKPDF program error.
RESULT: 130
STDERR:
STDOUT:
And after doing some research I found this possible solution:
https://code.google.com/p/wkhtmltopdf/issues/detail?id=289
So, I changed FilleZilla's file transfer type to Binary and uploaded wkhtmltopdf-i386 again. However, now I get the following error when attempting to generate the PDF:
WKPDF program error.
RESULT: 127
STDERR:
STDOUT:
The website's server is running on Linux and I do not have access to the shell (only to web files via FTP). Also, I have set all the proper permissions to the files.
What I don't understand is why it was working before but after over writing the files (with the exact same files) it stopped working.
Anyone has any idea how to get out of this problem?
I have found the issue: The bindings file was detecting the wrong CPU. I altered so it executes wkhtmltopdf-amd64 regardless of the detection and everything works fine now.
I've got a fairly simple cron job that pulls down some files from an FTP server - none of the files are particularly large, but I'm constantly getting the following:
Connected to voip.colefabrics.com, for user colefabrics\absolute
Warning: ftp_get(): Opening BINARY mode data connection. in /home/www/colefabrics.com/httpdocs/libs/classes/class.ftpObj.php on line 56
There was a problem while downloading website/items.csv
Attempt 2:
Connected to voip.colefabrics.com, for user colefabrics\absolute
Warning: ftp_get(): Opening BINARY mode data connection. in /home/www/colefabrics.com/httpdocs/libs/classes/class.ftpObj.php on line 56
There was a problem while downloading website/items.csv
...snip...
I've been through all the other posts relating to this, tried to enforce passive mode, increased the timeout, but nothing is working.
Does anyone know what might be causing this, and what I can do to try and resolve it?
To confirm, it's working fine via a 'normal' FTP client, it's only via PHP that I have a problem.
so I'm trying implement a website which uses data stored in an xml file.
It works fine on my computer, but as soon as I try to upload it, I get the following error:
Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "..\lib\menu.xml" in /home/ogwareco/public_html/menu.php on line 2
And none of the data gets displayed on the screen. I've Googled this problem, but it's led nowhere. I've got no idea what to do here. I've even tried to set my permissions to 777 (bad idea, I know), to see if it was a permissions thing, but it's not.
It looks like you are using backslashes to refer to the file on a Linux machine. Change
..\lib\menu.xml
to
../lib/menu.xml
in your code.
I have developed a script that uses php's imap_search and when it gets to the stage of finding the emails with the function imap_search() i get a error being produced
php in free(): error: chunk is already
free
Abort trap: 6 (core dumped)
This script requires to be run through a cron, But when it does it does that above error and seems to abort the script, If i run from the browser it has this error inside the error logs but still runs the script in full.
Below is the line it is failing on:
$this->mailbox_emails = imap_search($this->mailbox_stream,'ALL');
This is an internal php error. File a bug on the imap module (if you want it fixed fast, include an SSCCE).
Also note that this is a memory corruption issue, which is usually caused (long) before it is noticed. Therefore, the imap_search function is probably not the buggy one; the imap_* function you used just before it is a good candidate.