I have a seriously problem, when i execute my script to generate an excel file, it show a blank page.
This is the code:
http://pastebin.com/fb3KMYHv
The script run on Linux server (Hetzner is the hoster) and if there are a lot of records of my query it doesn't work.
Thanks.
Related
I am using php scripts as cron jobs.
I have this script, which opens a CSV file , parse its content to an array, then modify it and close it.
I added this script to the crontab.
The problem is when I delete that CSV file manually from the filesystem, the script still finds it and parse the old content as if that file was somehow cached.
When I execute the script using the command line, it works properly (does not find the CSV file).
I added at the beginning of the script clearstatcache() then opcache_reset() but nothing works
Thank you for your help
I have written a script in PHP which generates a PDF file containing an image. When I execute this script through browser it works fine, but when I execute it through a batch file it doesn't work. Could anyone help me figure out why?
I am using linux with phpadmin and trying to import a database. However it hangs about halfway through and just keeps constantly loading. I actually have to reset my computer and when I go check the tables, I get to about letter "F" on the tables list, each and every time. No errors, just a constant loading and a incomplete imported database.
I have already went into php config files and updated the post sizes and upload sizes, ect. But I am still getting this issue. Any help?
phpMyAdmin is limited by the PHP resource limits; memory, execution timeout, and so on. Depending on your situation, your file upload may take so long that the timeout is reached, or uncompressing the file may result in exceeding the memory limits.
You can try a few things:
Uncompress the file locally, then upload the .sql file
Use the "UploadDir" feature to place the file in a folder on your web server, which phpMyAdmin can then access locally.
Upload the .sql file and use the command line client, as suggested by #dognose. I tend to use the 'source' syntax; after connecting to the mysql command line client just use source database.sql. Depending on the .sql file, you may first have to create and/or use the database.
I am having problem running script of PHPWord.
I am trying to run sample example. Text.php after running it doesn't show anything. I checked it loads class successfully. Documentation.
I would like to able to run script anyone has this problem.
This is what i did -
Downloaded PHPWord_0.6.2_Beta.zip from Download link.
Extracted the zip under htdocs/core/phpword.
Created swap.php and pasted the whole code what was mentioned at Link
Commented, this is it was showing error.
//$myTextElement->setBold();
//$myTextElement->setName('Verdana');
//$myTextElement->setSize(22);
Now i run swap.php file and helloWorld.docx successfully created. You can flag a message if you want in that file. Let me know if you have any query.
Weird... Originally i thought that php was not correctly handling large file uploads (800mb-2gb)
now i've figured out that the file is moved correctly, but the mysql query that enters the file info into the DB seems to be skipped when large files are uploaded.
The mysql query is executed like it should be when small files are uploaded. This problem only seems to arise with larger files
Also, the mysql queries before the file is moved seem to work fine.
Process:
Wait for uploaded file,
check file size,
get md5 of file,
move file from temp folder to uploads folder,
if moving file is successful then mysql query.
The file is where is should be, but the query isnt executed.
Should i put a 10 second delay between after the file is moved and when the mysql query is called?
If the file move is working than the problem is most likely on the last step - the MySQL query. Max out the error level with error_reporting(E_ALL) and setup a PHP error log - this will record any MySQL warnings and any other problems. Log the SQL query you're trying to execute. Does it work from a MySQL client?
It sounds like large files are not being moved from the temp folder successfully? Can you confirm this by seeing if the file is still there in /tmp or wherever?