Comments (6)
Is this bug documented somewhere? Is it specific to PHP 5.5(.30)?
A quick test on PHP 5.3.3 (*nix) and PHP 5.4.7 (Win) showed no problems:
echo (is_readable($filename = tempnam('/tmp','getid3')) ? '' : 'not-').'readable: '.$filename;
What does that line of code output for you?
from getid3.
It outputs false
for me.
For is_readable
and is_writeable
, is_file
works fine.
I came across the error on Google App Engine, where I host my application.
I have only tried this out on PHP 5.5.X.
I'll find time later on to break down the issue, but this is the result I've gotten so far.
from getid3.
"false" is an unexpected output from that line -- it should say either readable or not-readable and confirmation of the temp filename that's generated. Perhaps this code is more explicit:
$filename = tempnam('/tmp', 'foo');
echo 'filename: '.$filename.'<br>';
echo (is_readable($filename) ? 'readable' : 'not-readable').'<br>';
echo (is_writeable($filename) ? 'writeable' : 'not-writeable').'<br>';
unlink($filename);
When you have time later to do some debugging it would be appreciated. After a few minutes of searching I can't find any other reports of the problem you describe with tempnam.
At this point my speculation is that tempnam() is returning false for you. getID3 attempts to auto-detect the appropriate system temp directory in which to create temp files, but if that's failing for you there is an override line you can uncomment in getid3.php line 63 where you can enter a temp directory you do have read/write access to.
from getid3.
Sorry about that, my response was the bool
value of is_writeable
. I didn't explicitly run your code block.
Anyways, I ran a full test, the temp file can we written, read and copied to a different location (on the local file system), and so on, but will always return false
from the two highlighted functions.
Here's the result from your code block as well.
filename: vfs://root/temp//tmp/foo56cb16f2992517.13579214
not-readable
not-writeable
It's a PHP issue, not the getID3
library.
I edited a piece of the library to get it to run properly on my app.
I could submit a PR later on with What-Why-How in detail so you'll get the full gist.
from getid3.
I think filename: vfs://...
is the key issue here.
Your analysis and code suggestions are welcome.
from getid3.
Closing issue for now. If you have future analysis or suggestions you wish to post, please do so.
from getid3.
Related Issues (20)
- MPEG-1 pixel aspect ratio is reciprocal of actual value HOT 1
- Incorrect audio metadata with some MP4 files HOT 4
- Bit rate for MP4 audio tracks HOT 3
- Reference getID3 from Google Apps Script HOT 1
- Purchasing a commercial license HOT 1
- `fread` length error in XMP HOT 2
- PHP Error as Severity: Notice Message: Undefined index: time_scale Filename: getid3/module.audio-video.quicktime.php Line Number: 335 HOT 1
- How to add Cover Image? HOT 1
- PHP Notice: Undefined index: data
- module.tag.id3v2 crashes PHP 8.2.12 if opcache enabled HOT 10
- fread(): Argument #2 ($length) must be greater than 0 HOT 1
- libxml_disable_entity_loader is deprecated HOT 3
- Garbage extracted from a RIFF tag in an AIFF file HOT 2
- Not work WRITE function in Windows 10/php7.4
- Write Synchronised lyric (SYLT)
- Unable to determine .gpx file HOT 5
- Deprecated: Implicit conversion from float ... to int loses precision HOT 7
- Mpeg duration error due to error in GOP parsing HOT 2
- Tag format "id3v2.3" is not allowed on "" files,
- Warning on PrintHexBytes function when $string is not a string. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from getid3.