Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


chevrolux

4962 posts

Uber Geek
Inactive user


#150916 7-Aug-2014 15:43
Send private message

Hi all,
Just having a bit of a fiddle with this...

Yealink make awesome IP phones with the ability to hook it up to a remote phonebook which is a xml page.

Some clever people have built a nice looking way to easily manage your phoenbooks as well as have it automatically generate the XML files but I just can't make the dam thing work!
Here is the Github repo...
https://github.com/octivi/yealink-phonebook

The way I read that is copy the files straight in to the web directory on the server and it should work. I do that, but when I try to browse to the page in Chrome browser it is just a blank page (view source is just empty). When I look at in in IE11 it comes back with error 500.

At the moment I have just been trying it on virtual server on my home VMware host. It is running CentOS with Apache and PHP version 5. Oh and it is only local so any security concerns you have don't worry about it.

I have next to zero knowledge of PHP and am just wondering if it is a package I need to add to the server.

Can anyone give me any pointers on what to look for?! By the looks of the screenshots it should all work so I can only assume I am doing something wrong.

Any help much appreciated!!

Cheers,
Sam

Create new topic
jarledb
Webhead
3253 posts

Uber Geek

Moderator
ID Verified
Trusted
Lifetime subscriber

  #1104201 7-Aug-2014 15:49
Send private message

Your best bet is probably to read the documentation. 

That said, you should look at your error log, that should tell you whats going wrong. Probably a web server configuration error or something like that.

The 500 error you are getting means something has gone wrong, my guess would be problems with the .htaccess files.


EDIT: Removed comment about closing php tag. Should not make any difference whatsoever, other than to people with OCD ;)




Jarle Dahl Bergersen | Referral Links: Want $50 off when you join Octopus Energy? Use this referral code
Are you happy with what you get from Geekzone? Please consider supporting us by making a donation or subscribing.




gzt

gzt
17104 posts

Uber Geek

Lifetime subscriber

  #1104203 7-Aug-2014 15:51
Send private message

Try something simple like this to find out if your php/apache is actually configured and really operating:

http://www.cyberciti.biz/faq/how-do-i-test-php-installation-with-a-phpinfo-page/

Zeon
3916 posts

Uber Geek

Trusted

  #1104236 7-Aug-2014 16:57
Send private message

Can you show us your error log? WHAT PBX are you using also? I remember setting a script in Asterisk that dynamically built the phonebook for all extensions as it was called - much easier than maintaining a separate list as you add/edit/delete extensions.





Speedtest 2019-10-14




wasabi2k
2096 posts

Uber Geek


  #1104261 7-Aug-2014 17:18
Send private message

Turn off friendly http messages in IE
enable show errors in your php.ini on server
load page
look at errors

kingjj
1728 posts

Uber Geek

ID Verified
Trusted

  #1104286 7-Aug-2014 18:24
Send private message

Just did a test install on CentOs 6.5 with Apache 2.4.1 and PHP 5.5.14, worked like a charm straight out of the box.

How did you install you LA(M)P? Are you sure you have loaded all required modules/packages?

If you want to spin up another VM you could try using one of the many free CP's out there to install all required packages and configure it as a web environment... Something like Z Panel, ISPConfig, Kloxo etc.

PHP is a fickle beast, best of luck.


chevrolux

4962 posts

Uber Geek
Inactive user


  #1104307 7-Aug-2014 19:23
Send private message

I am testing this on the FreePBX distro as that is what I would like to use in the long term on production boxes. The web server is already installed as part of the distro install. The FreePBX web inetrface is functioning fine so I figure PHP is configured fine for that side of it. It is CentOS 5.8, Apache 2.2.3 and PHP 5.3.10

So I managed to make it display some errors....


Warning
: require_once(/var/www/html/directory/app/../vendor/autoload.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/html/directory/app/bootstrap.php on line 9

Fatal error: require_once() [function.require]: Failed opening required '/var/www/html/directory/app/../vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/directory/app/bootstrap.phpon line 9


Seems to me it is looking for this 'autoload.php' file in a non-existant directory. So how come it has worked for some and not for me? It's the same script right?

chevrolux

4962 posts

Uber Geek
Inactive user


  #1104311 7-Aug-2014 19:42
Send private message

Zeon: Can you show us your error log? WHAT PBX are you using also? I remember setting a script in Asterisk that dynamically built the phonebook for all extensions as it was called - much easier than maintaining a separate list as you add/edit/delete extensions.



I'm not going for a directory of extensions rather a speed dial list.

I normally use a little Python script that pulls the Asterisk Phonebook and converts it to XML for the phones. Only thing is the Asterisk Phonebook is super basic and this little thing will make it all a lot more flexible.

 
 
 

Cloud spending continues to surge globally, but most organisations haven’t made the changes necessary to maximise the value and cost-efficiency benefits of their cloud investments. Download the whitepaper From Overspend to Advantage now.
chevrolux

4962 posts

Uber Geek
Inactive user


  #1107069 12-Aug-2014 14:11
Send private message

Hi all, still trying to figure this out.

So just to recap - CentOS 5.8, Apache 2.2.3, PHP 5.3.10, so yes a little older but that is what FreePBX use with their distro and is what I will use in production.

To get the files I just did a simple 'git clone' of https://github.com/octivi/yealink-phonebook.git and then copied the files in to the web directory.

PHP error log just always has the same two lines.....


[12-Aug-2014 02:05:23 UTC] PHP Warning: require_once(/var/www/html/yealink-phonebook/app/../vendor/autoload.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /var/www/html/yealink-phonebook/app/bootstrap.php on line 9
[12-Aug-2014 02:05:23 UTC] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/var/www/html/yealink-phonebook/app/../vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/yealink-phonebook/app/bootstrap.php on line 9


The way I look at the various 'index.php' files is they just redirect to another script somewhere else until it eventually gets to the one it can't find.

I just can't understand why they make reference to this 'vendor' directory and then the 'autoload.php'. Also, why does the error talk about pear? Do you think I need to change something in the index files?

I'm about to put this in the too hard basket but I'm sure it must just be something simple and stupid I am doing.

wasabi2k
2096 posts

Uber Geek


  #1107090 12-Aug-2014 14:55
Send private message

chevrolux: I am testing this on the FreePBX distro as that is what I would like to use in the long term on production boxes. The web server is already installed as part of the distro install. The FreePBX web inetrface is functioning fine so I figure PHP is configured fine for that side of it. It is CentOS 5.8, Apache 2.2.3 and PHP 5.3.10

So I managed to make it display some errors....


Warning
: require_once(/var/www/html/directory/app/../vendor/autoload.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/html/directory/app/bootstrap.php on line 9

Fatal error: require_once() [function.require]: Failed opening required '/var/www/html/directory/app/../vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/directory/app/bootstrap.phpon line 9


Seems to me it is looking for this 'autoload.php' file in a non-existant directory. So how come it has worked for some and not for me? It's the same script right?


OK
require_once is a php function to pull in another file. This is failing.
No such file or directory - prettty obvious
'/var/www/html/directory/app/../vendor/autoload.php' is the file failing
../ is the same as going up one directory
so look in /var/www/html/directory/vendor/autoload.php - does this file exist?

Is there a config file for the web app you are trying to deploy that requires entering in some config before working?

PEAR = PHP Extension and Application Repository - like CPAN for PHP

 

 

Critter
23 posts

Geek


  #1107108 12-Aug-2014 15:53
Send private message

If you are following the instructions, they recommend using a release file - this isn't the same as downloading the repo.
You can get it from this page:
https://github.com/octivi/yealink-phonebook/releases
or http://labs.octivi.com/yealink-phone-book-manager-released/

Then follow the other two steps in the process and see how you go. Good luck :)

chevrolux

4962 posts

Uber Geek
Inactive user


  #1107149 12-Aug-2014 16:31
Send private message

Wow. I feel rather stupid. Just assumed when they said release they were just referring to the repo.

So I chucked the actual release file in to the server. It loads up the page but nothing is clickable..... PHP error log says this.....


[12-Aug-2014 04:28:18 UTC] PHP Warning: simplexml_load_string() [<a href='function.simplexml-load-string'>function.simplexml-load-string</a>]: Entity: line 1: parser error : Start tag expected, '&lt;' not found in phar:///var/www/html/directory/yealink-phonebook.phar/src/Octivi/Service/XMLFileService.php on line 44
[12-Aug-2014 04:28:18 UTC] PHP Warning: simplexml_load_string() [<a href='function.simplexml-load-string'>function.simplexml-load-string</a>]: &lt;?xml version='1.0'?&gt;. in phar:///var/www/html/directory/yealink-phonebook.phar/src/Octivi/Service/XMLFileService.php on line 44
[12-Aug-2014 04:28:18 UTC] PHP Warning: simplexml_load_string() [<a href='function.simplexml-load-string'>function.simplexml-load-string</a>]: ^ in phar:///var/www/html/directory/yealink-phonebook.phar/src/Octivi/Service/XMLFileService.php on line 44
[12-Aug-2014 04:28:18 UTC] PHP Warning: Invalid argument supplied for foreach() in phar:///var/www/html/directory/yealink-phonebook.phar/src/Octivi/Form/DataEditForm.php on line 44
[12-Aug-2014 04:28:18 UTC] PHP Fatal error: Class 'DOMDocument' not found in phar:///var/www/html/directory/yealink-phonebook.phar/vendor/symfony/translation/Symfony/Component/Translation/Loader/XliffFileLoader.php on line 93

Critter
23 posts

Geek


  #1107165 12-Aug-2014 16:54
Send private message

Did you get that after editing the .htaccess file?
I'd suggest trying it with the defaults first and see if you still get errors.
I just tried it here and it opens without problems.



Critter
23 posts

Geek


  #1107171 12-Aug-2014 17:07
Send private message

I mean the default .htaccess and index.php files - everything exactly as downloaded.
The default/demo contacts.xml with one entry should be loaded.

chevrolux

4962 posts

Uber Geek
Inactive user


  #1107834 13-Aug-2014 17:42
Send private message

Thanks so much for the help!!

I thought I would try it on another OS so spun up a debian instance and installed the same versions of Apache & PHP.

Loaded the files as was suggested earlier in the thread and low and behold it all worked fine - actually it worked extremely well, i really really like it.

I can only assume FreePBX muck around with PHP in their distro. When I have a decent amount of time I will sit down and try to figure out the difference. Don't think I will get very far.

jarledb
Webhead
3253 posts

Uber Geek

Moderator
ID Verified
Trusted
Lifetime subscriber

  #1107882 13-Aug-2014 18:18
Send private message

chevrolux: Thanks so much for the help!!

I thought I would try it on another OS so spun up a debian instance and installed the same versions of Apache & PHP.

Loaded the files as was suggested earlier in the thread and low and behold it all worked fine - actually it worked extremely well, i really really like it.

I can only assume FreePBX muck around with PHP in their distro. When I have a decent amount of time I will sit down and try to figure out the difference. Don't think I will get very far.


Make yourself a little test.php file and add <?php phpinfo(); ?> - That will let you know which modules are installed. If you do that on both you might be able to see something missing on the FreePBX install. (But there is a lot of info on that PHPinfo page, so not sure you will find anything :)




Jarle Dahl Bergersen | Referral Links: Want $50 off when you join Octopus Energy? Use this referral code
Are you happy with what you get from Geekzone? Please consider supporting us by making a donation or subscribing.


Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.