Does anyone have experience with the PHP CSV Utilities library ( http://code.google.com/p/php-csv-utils/wiki/Documentation )? I've tried to install it on my Mac--I'm running XAMPP and editing with Aptana 3. I followed the instructions and copied the CSV folder over to my project file so the organization looks like this:
xamppfiles
htdocs
MyFirstPHP
Csv
Reader.php
AutoDetect.php
Exception.php (and so on)
index.php
(xampp files contains folder htdocs, which contains folder MyFirstPHP that contains the index.php file and the CSV folder with Reader.php, AutoDetect.php, Exception.php, etc.)
When I go to create a new class of CSV_Reader, Aptana recognizes the new class and helps me create it, but when I run it in my browser I get a fatal error. I also tried a require_once like so:
require_once 'Reader.php';
I also tried requiring all of the included files (AutoDetect.php, Exception.php, etc.). Did I install the library in the wrong location? I've searched through a ton of Google documentation and blogs, but have yet to find a way to make this work successfully.
Related
I try to get this done from github. https://github.com/binance-exchange/php-binance-api
I installed Xampp (latest version: 7.2.3) on a win 10 machine. Xampp is running. (at least not mysql, because it has an error while starting, but mysql is not needed). I downloaded the files from github and puttet them into my htdocs in a new folder called "binance". I downloaded the install-file for composer from here: https://getcomposer.org/doc/00-intro.md#installation-windows Installed it and choosed the php.exe out of my xampp folder inside the installation-process.
Composer starts out of the console, and it works. I put this command into the cmd:
php composer.phar require "jaggedsoft/php-binance-api #dev"
It installs some folders and files, into my project-directory. it's right.
Inside of the files downloaded from github, there is a file called:
php-binance-api-test.php
Inside this file, there are different lines like:
require 'vendor/autoload.php';
file_put_contents( getenv("HOME") . "/.config/jaggedsoft/php-binance-api.json"
But he is not able to find ".config/jaggedsoft/" because there is no folder named .config. There is also no file named php-binance-api.json only one called php-binance-api.php
I would be really thankful, if someone may try to get this run an tell me, what I have done wrong.
I have had the same problem on my Ubuntu server and I could solve it by setting HOME directory at the top of my scripts as:
putenv("HOME=/var/www/html/");
My config is at a directory of
/var/www/html/.config/jaggedsoft
File name is php-binance-api.json and file content is:
{
"api-key": "ApiKeyHere",
"api-secret": "ApiSecretHere"
}
I have exported the Meetings module from SuiteCRM, renamed all the occurrences to Events module, zipped it. Now when I try to upload the file to SuiteCRM it says
The zip file is missing a manifest.php file. Cannot proceed.
I have tried with multiple archivers(default, terminal and some other), getting the same error every time.
I have also tried with the answers in this post, but nothing working.
Here is directory structure. manifest.php is present in the zip and folder as well.
./.DS_Store
./Extension/modules/Events/Ext/Vardefs/sugarfield_jjwg_maps_address_c.php
./Extension/modules/Events/Ext/Vardefs/sugarfield_jjwg_maps_lng_c.php
./Extension/modules/Events/Ext/Vardefs/sugarfield_jjwg_maps_lat_c.php
./Extension/modules/Events/Ext/Vardefs/sugarfield_jjwg_maps_geocode_status_c.php
./manifest.php
./SugarModules/.DS_Store
./SugarModules/include/.DS_Store
./SugarModules/include/language/en_us.Events.php
./SugarModules/modules/.DS_Store
./SugarModules/modules/Events/logic_hooks.php
./LICENSE.txt
Version 7.8.27
Sugar Version 6.5.25 (Build 344)
am I missing something while exporting, importing or zipping?
if anyone having the same issue, I guess this will help a bit.
I tried all the things that are mentioned anywhere and everywhere. Still was unable to get module imported. The steps are below that you need to follow.
Export module.
Unzip the folder and change all occurrences from ActualModule(Meetings in my case) to CustomModule(Events in my case.)
Check if there is any key left in Vardefs. This could be normally singular(like Meeting) and change it to singular(Event).
Save all the changes.
Zip all the contents of the directory. Yes, the contents only, not the directory itself. In my case it was Events-XXXXXX and I was zipping the directory itself. Just zip the contents that are inside the Events-XXXXXX directory.
Import module within the CRM with Module Loader and install it.
I try to get this done from github.
https://github.com/binance-exchange/php-binance-api
I installed Xampp (latest version: 7.2.3) on a win 10 machine. Xampp is running. (at least not mysql, because it has an error while starting, but mysql is not needed).
I downloaded the files from github and puttet them into my htdocs in a new folder called "binance".
I downloaded the install-file for composer from here: https://getcomposer.org/doc/00-intro.md#installation-windows
Installed it and choosed the php.exe out of my xampp folder inside the installation-process.
Composer starts out of the console, and it works.
I put this command into the cmd:
php composer.phar require "jaggedsoft/php-binance-api #dev"
It installs some folders and files, but not into my project-directory. It downloads and installs it into "user/vendor/..." on my drive c.
Inside of the files downloaded from github, there is a file called:
php-binance-api-test.php
Inside this file, there are different lines like:
require 'vendor/autoload.php';
file_put_contents( getenv("HOME") . "/.config/jaggedsoft/php-binance-api.json" ,
I copied the whole vendor directory into my project directory, so he can find his files.
But he is not able to find ".config/jaggedsoft/" because there is no folder named .config.
There is also no file named php-binance-api.json only one called php-binance-api.php
If I try to access some of the sample file, like web_socket_chart.php in examples, he gives me an fatal error:
Fatal error: Uncaught Error: Class 'React\EventLoop\Factory' not found in
...
this might be a file inside of the php-folder of xampp, but how does he load it before to get the class nedded?
I think i messed up the installation of composer? or do I have to choose other place for the project inside of xampp?
What is composer even good for? I would be really thankful, if someone may try to get this run an tell me, what I have done wrong.
I wish to use TCPDF so have downloaded the code and am having trouble using it.
I work on Mac locally using MAMP.
My project is stored in:
/Applications/MAMP/htdocs/my-project-title
I place the whole tcpdf folder in my project so it's location is:
/Applications/MAMP/htdocs/my-project-title/tcpdf
I found a file tcpdf_include.php in the examples directory so I pulled it out and placed it also in the tcpdf folder:
/Applications/MAMP/htdocs/my-project-title/tcpdf/tcpdf_include.php
So I wasn't sure if this was right but it seemed so. I then referenced tcpdf_include.php in my script: require_once('../tcpdf/tcpdf_include.php'); and it found the file all good.
Now I was confused as to how exactly this was working. I ran an example and got nothing and error log states:
[04-Nov-2015 16:27:36 Europe/Berlin] PHP Fatal error: Class 'TCPDF' not found in /Applications/MAMP/htdocs/my-project-title/scripts/myscript.php on line 15
... so it seems like it's just not running the script. I went to the config file to attempt to edit some stuff there.
I changed the following in the config file:
define ('K_PATH_MAIN', '/MAMP/htdocs/my-project-title/tcpdf/');
define ('K_PATH_URL', 'http://localhost:8888/my-project-title/tcpdf/');
These are now inline with how my project is set up. But I'm still getting the above error when I try to run the script.
What am I missing are there any examples of how to properly configure TCPDF?
Try this:
Store the script you are trying to run in /Applications/MAMP/htdocs/my-project-title, eg. /Applications/MAMP/htdocs/my-project-title/test.php
In that script, just do require_once('tcpdf/tcpdf.php'); (I'm assuming the tcpdf folder is still sitting here: /Applications/MAMP/htdocs/my-project-title/tcpdf)
You should then be able to instantiate an instance of the TCPDF class.
You shouldn't need to worry about anything else - it should just work. If it doesn't, try creating a fresh folder in your htdocs folder, drop a fresh copy of tcpdf in there and try again, just in case you've moved something in your current version that is messing things up.
To be clear, this is what test.php should contain:
require_once('tcpdf/tcpdf.php');
$pdf = new TCPDF();
Good luck!
So I have made several different file access permissions for our company's site. Which are dev,core and essential.
To fine manage them, we set up repositories for each level of access permissions (files do not duplicate).
And I have the files in /var/repo/dev, /var/repo/core, /var/repo/essential.files are symlinked to /var/www/exmaple.com/
The framework we are using is Laravel, and it has some bootstrap stuff. The first is to require the autoload.php
The problem is the index.php is located in /var/www/example.com/public_html/, when it requires the autoload.php. It traces back to /var/repo/essential folder, which wont help it to find autoload.php.
I'm just wondering if there is a way to make it not following the symlinks (back to /var/repo/.....). while to the actual folder it's in?