I am new to PHP. I am trying to send email through PHP.
The error I got while sending is:
[23-Sep-2014 15:31:08 UTC] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/ixed.5.2.lin' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/ixed.5.2.lin: cannot open shared object file: No such file or directory in Unknown on line 0
[23-Sep-2014 15:31:08 UTC] PHP Fatal error: Directive 'allow_call_time_pass_reference' is no longer available in PHP in Unknown on line 0
cannot open shared object file: No such file or directory in Unknown on line 0
I don't know how to solve this. I browsed a lot they said some suggestions.
I am new to PHP and I can not find the solution(s) for this.
Hope you guys help me to complete my first PHP task successfully...
Thanks in advance...
EDIT : Sorry friends even hello world is not working.. I dont know what to do now whether iwant to install anything... Forgive me for asking very silly questions.. Though am very new am struggling..
Check if /usr/local/lib/php/extensions/no-debug-non-zts-20100525/ixed.5.2.lin really exists.
(i guess it does not)
After that, you should find it:
locate ixed.5.2.lin
and put it into the location your php is looking for.
(/usr/local/lib/php/extensions/no-debug-non-zts-20100525/)
If locate does not give any results, you have to install the missing library ...
Remark: to do locate, you will need a console, preferrably with root access.
Edit: Also please check if a simple print('hello'); would work, if not, you should fix your PHP install first.
Check if the binary exists in extension directory on the server OR the extension directory is correctly defined in php.ini. These are the possibilities which is causing problems. Also try setting permissions to 755 on ixed.5.2* once and see if that makes the trick.
Thank you so much for all who spent your time to take part in my issue.
I solved that by contacting my server person..
There is some issue in my curl file, One ; is missed out in that.
Now everything works fine..
Special Thanks for Gipsk Jakab .... His answer narrowed my prob...
Related
I would like to change php version to 7.1 and i have an error:
PHP Warning: PHP Startup: Unable to load dynamic library
'C:\Program Files\PHP\v7.1\ext\php_sqlsrv_7_nts_x86.dll' - The specified procedure could not be found.
in Unknown on line 0
First think. This is not duplicate question because i checked many similar questions.
I'm using IIS, PHP 7.1, and SQL server (thats why i need sqlsrv drivers).
I checked php.ini file aready and i change extension-dir path to full path but nothing happens. (Logically if path is a problem why it works with other extensions? ).
It works with PHP 7.0.7 (all enabled extensions is exactly same)
Update: still won't work but i tried to paste path from error message to file explorer and file already there.
Turns out that PHP 7.0 and PHP 7.1 are not compatible and the mssql PDO drivers are for 7.0.
Github issue here
Also ensure you including the right 64/86 and ts/nts version.
As from Toby Allen's accepted answer above 7.0 and 7.1 are incompatible,
However Microsoft has released Preview versions of the drivers for 7.1.
This worked for me, hope it helps anyone searching.
Drivers can be found here under downloads
I had this issue yesterday. The key to the error is the last bit.
The specified procedure could not be found.
In my case I went through a painful amount of debugging. The first thing that I noticed was that when I ran a hello world php file, I didn't get this error. That indicated to me it wasn't actually a problem loading the file, it was a problem calling a function in the file.
I went in and repeatedly put die() statements in and moved it until it hit the error. It took awhile but I eventually discovered I was calling sqlsrv_connect with options that were (apparently) now invalid.
So I can't say the exact cause of your issue without seeing the code that actually causes the error, but I hope this at least points you in the right direction.
I have been trying to figure out whats going on here... I have looked all over and nothing seems like a solid solution. If anyone knows a link or information on how to fix this it would be greatly appreciated.
Ubuntu 14.04 lts
Microsoft Azure Server
Apache
Drupal site with APC enabled (everything looks good on the drupal side) I just keep getting these annoying emails about the below issue.
I added smtp and mailutils to my server, and now i am getting these errors from what looks like apache / php...
--
Cron [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime)
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/apc.so' - /usr/lib/php5/20121212/apc.so: cannot open shared object file: No such file or directory in Unknown on line 0
Thanks for the help,
-Frank
These are being generated by the /etc/cron.d/php5 cronjob. If you want the errors generated here to stop being emailed, you can set mailto="" on the line before the command in that file. This is probably not your desired solution here, but it is useful to 1) know where you can find where the error is coming from and 2) know how to control its output.
The command generating these errors is likely maxlifetime. You can confirm this by trying to run /usr/lib/php5/maxlifetime and seeing if the same error comes up.
Your apc.so file might be somewhere else. Try "locate apc.so" to find out where it is. If it doesn't exist, I would recommend reinstalling the extension so that it does exist. If it does exist, your /etc/php5/apache2/php.ini file might be having trouble finding it. A couple solutions I read from other threads had people either creating a symbolic link to to the file (a bit sloppy, but it works) or noticing that "extension_dir=" in php.ini was set to something other than "./" so that it was looking in the wrong place (or the "extension=apc.so" entry itself contained some of the path and had a typo or something).
In my case, my php.ini file was trying to load the extension msql.so which didn't exist on my system. I don't know why it would do this, but I commented out the line and the error messages went away. In most cases, though, I would assume the extension was deliberately installed so you would want to go the route of tracking it down or fixing it.
Good luck.
I have what should be a fairly straightforward operation, which gives me an error that doesn't seem very helpful. The code is this:
<?php
$strLines = file('//tardis/htdocs/apps/freespace/FreeSpace-Servers.txt');
.
.
.
?>
But in php-errors.log, I get this:
[28-Aug-2013 16:31:30] PHP Warning: file(//tardis/htdocs/apps/freespace/FreeSpace-Servers.txt) [function.file]: failed to open stream: Invalid argument in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\apps\freespace\freespace.php on line 2
The txt file is definitely there. Any ideas what else an "Invalid argument" might suggest? The documentation doesn't seem to hint at much of anything else. Or, should I be doing this a different way? My goal is to read the file in as an array of things. All help is appreciated.
If you're using UNC, then the address should be
file('\\\\tardis\\htdocs\\apps\\freespace\\FreeSpace-Servers.txt');
You may also need to check that your PHP configuration allows you to open remote files.
I have a somewhat more correct answer than any of the above. While all of the above is completely right, the actual problem (and solution) is detailed on question 18748985: PHP fails to read files.
The short answer is: The Apache user password was changed, but Apache didn't know about it. Update the password and restart the service. The overall problem is slightly more colorful than that, but that's how the issue is most succinctly reduced.
I'm debugging some PHP code written by an outsourcing company (I'm not a PHP guy at all but know the basics; we have an offshore team of PHP developers working for us on this project) that's not working; the code is supposed to be called every 30 minutes by a cron job but its not firing. I tried to run the PHP script via the command line to test if it's working, but it's giving me the following (anonymized) errror:
PHP Fatal error: require_once(): Failed opening required '/myapp/_lib/_classes/MySql.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/myapp/_lib/_base/common.inc.php on line 6
However, the file /var/www/html/myapp/_lib/_classes/MySql.php exists under the proper directory. I'm missing something simple, I'm sure, but like I said I know really nothing beyond the bare basics of PHP and I really need to get this service up and running.
EDIT: The code is using the __autoload() function with all classes in /_lib/_classes
if you start a file name with a slash, it means it's an absolute path. try instead:
require_once('/var/www/html/myapp/_lib/_classes/MySql.php');
Case sensitivity maybe? I've had that problem before.
I'm guessing it's a permissions issue - make sure both your account (for testing purposes) and whatever account cron is going to run your script under (quite possibly yours, but maybe a different one) have read privileges on the file.
Also: the path for the include says /myapp/_lib/_classes/MySql.php, whereas it exists in /var/www/html/myapp/_lib/_classes/MySql.php. Can you change the include to reference the full path?
As said, casing and in addition the correct permissions to access that file are needed.
I am currently using an image manipulation script to do some work on uploaded images and I'm running into a problem in my dev environment. This same code works on my production server.
The error is:
PHP Warning: imagecreatefromjpeg(): php_network_getaddresses:
getaddrinfo failed: Name or service not known in /path/to/script.php
on line 75
The line of code on 75 is:
$this->img = imagecreatefromjpeg(PHPTHUMB."?src=/".$this->image_path);
which creates an image that is loaded from another made by phpThumb, which is used for further manipulation.
Any ideas on how to solve this? Can anyone shed some light on what the error means?
Thank you,
Edit:
Just as a further bit of insight, if i visit PHPTHUMB . "?src=/" . $this->image_path in my browser, the image loads fine
User agent in php.ini did not solve the problem as indicated here
EDIT (SOLUTION): I had to add the INTERNAL 192.168.204.XXX IP into the hosts file, so that http://dev.mysite.com resolved correctly. Trying both 127.0.0.1 and the external IP yielded no result, but the internal works perfectly. Thanks for everyone's efforts,
I'm totally not sure about the cause of that error, but this is my best guess.
There is a particular PHP Setting which enables you to treat URLs as files. Normally imagecreatefromjpeg accepts a filename, I think. Since you are passing a URL, you need to make sure the particular setting is enabled. I believe you can find more info about it here: http://us2.php.net/file
filename
Path to the file.
Tip
A URL can be used as a filename with this function if the fopen
wrappers have been enabled. See
fopen() for more details on how to
specify the filename and List of
Supported Protocols/Wrappers for a
list of supported URL protocols.
Fopen wrappers: http://us2.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen
Your dev environment may not be setup with this, but your production environment could be.
Edit
This page lists your error:
http://bugs.php.net/bug.php?id=11058
and mentions that a possible fix is by modifying your hosts file to explicitly include the ip/dns of the server you're accessing.
i tryed to reconfigure my named
configuration, without any result, to
fix this. the problem was solved by
adding the following line to my
/etc/hosts:
194.97.55.147 mx.freenet.de
Maybe you can try this?
did you also check that allow_url_fopen is set to On in php.ini?
I saw that they did mention that in the article you referred to in your post.
EDIT: Also, what OS and what PHP version are you running?
Just read this on php.net: "On Windows versions prior to PHP 4.3.0, the following functions do not support remote file accessing: include(), include_once(), require(), require_once() and the imagecreatefromXXX functions in the GD Functions extension."
EDIT2:
I just read what was written in the comments, your allow_url_fopen is set to On, sorry about that.
But OS, PHP version and phpinfo() would help in finding the problem.
The error message suggests something is wrong at a networking level. Thus, if possible, bypass that. Try using the path to the thumbnail generator, instead of a network address.
If that's not an option, try something that will give you more granular error messages. I suggest CURL. At the very least, it should yield a more informative error message.
The simple fact that this is failing is because on your webserver, your DNS resolution is broken.
If you have SSH access to your server, try the following command
dig hostname
where hostname is the host name from PHPTHUMB
This will probably fail.
Assuming that you're using Linux, my suggestion would be to edit your /etc/resolv.conf (as root)
and add the following line before any other lines beginning with "nameserver"
nameserver 4.2.2.2
This should hopefully fix things, though you may have to restart apache (or whatever webserver you're using)!
The issue here is that php fails to resolve the url that you provide as PHPTHUMB as stated in this bug report on php.net. This possibly means that it's the fault of the operating system/web server, in which case you can enter the ip address of the server you are connecting to into your hosts file manually.